cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic source message to known message mapping

Former Member
0 Kudos

Hello Experts,

I have a dynamic message in that looks like this:

<xsd:schema>

<xsd:element name="DynamicMessage">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="ID" type="xsd:string"/>

<xsd:element name="Body">

<xsd:complexType>

<xsd:sequence>

<xsd:any minOccurs="0"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:schema>

Now I need to map that message into a couple of choices messages by the ID that I get in this message.

lets say for ID="1" I need to map this message into this:

<xsd:schema>

<xsd:element name="Person">

<xsd:complexType>

<xsd:sequence>

<xsd:element name="Name" type="xsd:string"/>

<xsd:element name="Age" type="xsd:Integer"/>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:schema>

This message is the source message when the ID is 1:

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

<ns0:DynamicMessage xmlns:ns0="Namespace">

<ID>1</ID>

<Body>

<Person>

<Name>RandomName</Name>

<Age>33</Age>

</Person>

</Body>

</ns0:DynamicMessage>

How do I make such mapping? how can I make all the content of body to be inserted to the persson mesage?

If there is a way to do it using the normal graphic mapping it will be better for me then a Java/Abap mapping.

Thanks,

Roei Sagi.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Thanks for the answer but I cannot use java/abap mapping or ask the provider to change the message.

I do know there is a way to just map a node to another node and all the data of node 'A' (including is subelements) are

transfered automatically into node 'B' without any need to map the subelements, I do not know how to do it I only saw it once.

If you have another suggestion how to do it or someone else does I would really appriciate it!

Thanks again for your help.

stefan_grube
Active Contributor
0 Kudos

> Thanks for the answer but I cannot use java/abap mapping or ask the provider to change the message.

In this case: I am sorry, there is no solution.

> I do know there is a way to just map a node to another node and all the data of node 'A' (including is subelements) are

> transfered automatically into node 'B' without any need to map the subelements, I do not know how to do it I only saw it once.

Yes, this is possible, but then your target is the same as the source. The only nodes that you have are ID and Body. Those two nodes can be mapped to target.

You cannot map for example Name or Age to different target fields.

So you cannot do a mapping for example to a IDoc structure.

Former Member
0 Kudos

I was shown how the mapping of the body is, there is a whole structure in source and a complex node inside,

That node (only the header the subelements were gray) was linked into the body part and when you use this mapping everything under the header went into the body.

Can't I do the same with the opposite position where the body drops all of is data into the target message?

(And by the way how do I do that? make the whole node transfer into a target node and all of source message subelements transfer into the target subelement of the linked node)

stefan_grube
Active Contributor
0 Kudos

See this:

It seems not to be part of online help

Edited by: Stefan Grube on Oct 6, 2011 4:55 PM

stefan_grube
Active Contributor
0 Kudos

> How do I make such mapping? how can I make all the content of body to be inserted to the persson mesage?

> If there is a way to do it using the normal graphic mapping it will be better for me then a Java/Abap mapping.

This is not possible. No mapping tool will help you with xsd:any.

You can use ABAP/JAVA mapping or convince the provider of the message to create xsd ressources without xsd:any