on 12-23-2016 12:32 PM
Hi All,
i have one mapping requirement, from the source we are receiving message as a proxy.
in the message we have one node and under this we have two fields which will repeat multiple times.it is like
<parameter name>
<parameter value>
in this we need few field values as a field names in the receiver structure. client don't want o change the receiver structure.
source xml:
<parameter name> janardhan </parameter name>
<parameter value> 123456</parameter value>
output xml
<janardhan>123456</janardhan>
could you please let me know how can we achieve this requirement.
Regards,
Janardhan
Hi Janardhan!
Take a look at this blog:
https://blogs.sap.com/2012/11/05/message-mapping-play-around-with-target-structure/
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Janardhan!
Since you need to map one of your source elements to target element name and another source element is to be mapped as target element value, you can create UDF, that takes two input parameters: first is target node name and the second - target node value. In your UDF code you change target node name as described in blog given above and return the second parameter's value. Thus you'll get the target element with name taken from the first parameter and value from the second parameter.
Regards, Evgeniy.
Hi Evgeniy,
Thanks for your solution, but unfortunately my entire requirement got changed. the fields which has to generate dynamically, now i maintained in receiver structure so no need to generate fields dynamically. now in the field name i just need to add tnp.. for example
the input is <janardhan>1234<janardhan>
output should be <tnp:janardhan> 1234 <tnp.janardhan>
it is having single input, so how can i achieve this?
Regards,
janardhan
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.