cancel
Showing results for 
Search instead for 
Did you mean: 

Message mapping: Passing data at the node level

laxman_molugu
Participant
0 Kudos

Hi,

I have a question/requirement, XI Message Mapping program need to read the incoming xml and map to a diffrerent target structure. Incoming xml has a parent node called Description and it has a value "Frauen Hemd Shoes", we need to map this value to target LongText Field but message mapping is ignoring this data while mapping.

A parent node can't hold the value/data while a child node is present. So is there any workaround to read this data to target str?

<Description>

<ShortName>Shoes</ShortName>

Frauen Hemd Shoes

</Description>

Expected result:

<Comments>

<ShortText>Shoes</ShortText>

<LongText>Frauen Hemd Shoes</LongText>

</Comments>

Please let me any clues to resolve the issue.

thanks,

Laxman

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi Laxman,

As a couple replied mentioned, the input seems invalid.

If you really insist doing in this way, you can use Java Mapping or ABAP mapping program, parse input stream, you can find sample program SDN.

Liang

Jitendra_Jeswan
Contributor
0 Kudos

I agree , the soruce structure is not a valid one..

The source structure should look like the below:

<Description ShortName='Shoes'>

Frauen Hemd Shoes

</Description>

where ShortName is attribute for the Element "Description".

You add attribute to the element the same way you add subElement, Just choose attribute instead of subelement.

In this case the Mapping would be

Descriprion -


> LongText (target)

ShortName -


> ShortText (target)

This Should work.

Regards.

Jeet.

laxman_molugu
Participant
0 Kudos

Hi,

Thanks for quick responses, the above xml is a valid outside XI and even XI can read this xml but message mapping program ignoring the value at the parent element level. I know when I test in Test tab it skips this value. I am looking for any work arounds?

thanks,

Laxman

laxman_molugu
Participant
0 Kudos

Any other clues?

Former Member
0 Kudos

hey,

you can't do it by Graphical mapping, you should write java/ABAP for that.

r u getting the input XML from any webservice?

i remember we faced a problem like this in my earlier project... i am sure that XI will not support this in Graphical Mapping....

Regards,

Karan.

ranjit_deshmukh
Active Participant
0 Kudos

The source structure is not a valid one to let message mapping understand it

please check in test tab.

to achieve this

<Description>

<ShortName>Shoes</ShortName>

Frauen Hemd Shoes

</Description>

shud be something like:

<Description>

<ShortName>Shoes</ShortName>

<anyOtherNode>Frauen Hemd Shoes</anyOtherNode>

</Description>

Ranjit

former_member214364
Active Contributor
0 Kudos

Hi Laxman,

are you sure that <Description> in source strcture is node or element?

You cant put value in to node like an element.

i guess <Description> is element and <ShortName> is attribute.am i right?

Cheers,

Jag