Skip to Content
0
Former Member
Jun 08, 2010 at 07:10 AM

File sender adapter: Content conversion for very deep nested structure

95 Views

Hi all

I have a file which looks like this

HDD    9800000660980000061911062009AA123456bbWM100012349800000619 
DDD_TEST001 4012YAG1  
WZOA00000000010000000001
WZOA00000000020000000002
IAAXX000001
IAAXX000002
C0000000000000000000100000000000000000001000000000000000000020000000000000000000300000000000000000004
T2

and my structure is

Header - 1

Detail - 0....Unbounded

Bag - 0.....Unbounded (sub node of detail)

Track - 0.....Unbounded (sub node of detail)

Customer - 0.....Unbounded (sub node of detail)

Trailer - 1

and in the file sender adapter i mentioned the following content conversion setting

HEADER,1,DETAIL,*,Bag,*,Track,*,Customer,*,TRAILER,*

But when i go and see in the monitoring i received the following conversion where BAG, TRACK and CUSTOMER nodes are outside detail.

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

http://royalmail.com/dd_c">

<HEADER>

</HEADER>

<DETAIL>

<ID>D</ID>

<count/>

</DETAIL>

<Bag>

<ID>W</ID>

<Zone>ZOA</Zone>

</Bag>

<Bag>

<ID>W</ID>

<Zone>ZOA</Zone>

</Bag>

<Track>

<ID>I</ID>

<Item>AAXX000001</Item>

</Track>

<Track>

<ID>I</ID>

<Item>AAXX000001</Item>

</Track>

<Customer>

<ID>C</ID>

<OrigCustomer>00000000000000000001</OrigCustomer>

<Field1>00000000000000000001</Field1>

</Customer>

<TRAILER>

<ID>T</ID>

<Count>2</Count>

</TRAILER>

</ns:MT_REQ>

whereas i wanted bag, track and customer to be inside detail along with details data:

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

http://royalmail.com/dd_c">

<HEADER>

</HEADER>

<DETAIL>

<ID>D</ID>

<count/>

<Mixed />

<Bag>

<ID>W</ID>

<Zone>zzz</Zone>

</Bag>

<Bag>

<ID>W</ID>

<Zone>zzz</Zone>

</Bag>

<Track>

<ID>I</ID>

<Item>AAXX000001</Item>

</Track>

<Track>

<ID>I</ID>

<Item>AAXX000001</Item>

</Track>

<Customer>

<ID>C</ID>

<OrigCustomer>00000000000000000001</OrigCustomer>

<Field1>00000000000000000001</Field1>

</Customer>

</DETAIL>

<TRAILER>

<ID>T</ID>

<Count>2</Count>

</TRAILER>

</ns:MT_REQ>

i.e. i need all Bag ,Track and Customer inside detail tag.

could anyone help me in this..i've already searched SDN and got some link as useful but none of them were totally related.

Regards

Naina