Skip to Content
0
Former Member
Nov 07, 2005 at 08:52 PM

Create substructures via file adapter - file content conversion

20 Views

I have a need to create a structure as follows using file content conversion from a flat file

source:

H1~00

S1~1A

L1~1B

S1~2A

L1~2B

S1~3A

L1~3B

<?xml version="1.0" encoding="UTF-8"?>

abt.com/IAM">

<DocHeader>

<Label />

<type />

</DocHeader>

<DocItem>

<Ship>

<Label />

<type />

</Ship>

<Lines>

<Label />

<type />

</Lines>

</DocItem>

</ns:x_MT>

I can successfully create a x_MT but I do not get the heirarchy (DocItem node) and therefore I'm having trouble on the mapping side.

My file content conversion is as follows:

Document Name: x_MT

Document Namespace: urn:abt.com/IAM

Recordset Name: x_DT

Recordset structure: DocHeader,1,Ship,,Lines,

Recordsets per message: *

Key Field Name: label

DocHeader.fieldSeparator '0x7E'

DocHeader.endSeparator 'nl'

DocHeader.fieldNames label,type

DocHeader.keyFieldValue H1

Ship.fieldSeparator '0x7E'

Ship.endSeparator 'nl'

Ship.fieldNames label,type

Ship.keyFieldValue S1

Lines.fieldSeparator '0x7E'

Lines.endSeparator 'nl'

Lines.fieldNames label,type

Lines.keyFieldValue L1

What I get is a structure without the node DocItem and therefore appears like a flat structure and mapping fails since I have multiple 'Lines' and only the last one gets mapped.

I've read all the weblogs around this topic and none seemed to address more than one node. Please help.

Thank you,

Parimala