cancel
Showing results for 
Search instead for 
Did you mean: 

Getting rid of a context level in mapping

Former Member
0 Kudos

I have a message type of structure

Root 1..1

Level 1 0..unbound

Level 2 0..unbound

item1 0..1

item2 0..1

and would like to map it to

Root 1..1

Level 1 0..unbound

item1 0..1

item2 0..1

Does not sound too hard, but I am struggling. I have started with mapping

root --> root

level2 --> level1

item1 --> item1

item2 --> item2

which of course the system did not like.

Then I have tried

root --> root

level2 --> removeContexts --> level1

item1 --> removeContexts --> item1

item2 --> removeContexts --> item2

Tested again and failed.

My source message looks like this:

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

<ns:MT_AddressData_Resp xmlns:ns="http://caw.com/xi/cawGeoCode">

<cawGeocodeInboundInfo>

<cawGeocodeInboundInfo>

<CLIENT>007</CLIENT>

<ADDRNUMBER>0000022110</ADDRNUMBER>

<CITY_1>Niederhausen</CITY_1>

<POST_CODE1>55585</POST_CODE1>

<STREET>Weinbergsblick</STREET>

<HOUSE_NUM1>7</HOUSE_NUM1>

<COUNTRY>DE</COUNTRY>

<X>0</X>

<Y>0</Y>

</cawGeocodeInboundInfo>

<cawGeocodeInboundInfo>

<CLIENT>007</CLIENT>

<ADDRNUMBER>0000022134</ADDRNUMBER>

<CITY_1>Paris</CITY_1>

<POST_CODE1>75001</POST_CODE1>

<STREET>Avenue 12</STREET>

<HOUSE_NUM1></HOUSE_NUM1>

<COUNTRY>FR</COUNTRY>

<X>0</X>

<Y>0</Y>

</cawGeocodeInboundInfo>

</cawGeocodeInboundInfo>

</ns:MT_AddressData_Resp>

Level1 has no meaning...I had to define the message type like this since otherwise my FileAdapter does not like to convert the CSV-File coming into XI. It is basically the recordset name. If I leave it empty it auto-populates it with "Recordset" and I keep on having the same issue.

I am on XI 3.0 SP14. Any help either for the mapping or the suppressing of the additional level is highly appreciated.

Thanks,

Jens

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Pls try this...

root --> root

level2 --> removecontexts --> level1

item1 --> item1

item2 --> item2

Former Member
0 Kudos

Hi Renjith,

tried your advice and it worked fine with the manual entry of test data, but not when I imported my message. But since I knew I am on the right track with your help I was able to find a typing error in my message type. Now everything works fine.

Thanks mate.

Answers (0)