on 12-08-2023 6:12 AM
Hello Experts,
I have a requirement where I need to combine a field from input xml and output xml and form a resultant xml payload having these two fields. Input and output xml have recurring context. Any idea how this can be achieved in CPI ?
Regards,
Varun Vichare.
Hi Varun,
not sure if this is the best solution but you may do this with an n:1 message mapping, for one of the messages, you need to store the payload in an exchange property, the other I assume is still in the body, so in a content modifier first wrap the payloads with the Messages nodes, like:
<ns1:Messages xmlns:ns1="http://sap.com/xi/XI/SplitAndMerge">
<ns1:Message1>
${property.payload}
</ns1:Message1>
<ns1:Message2>
${in.body}
</ns1:Message2>
</ns1:Messages>
then create the message mapping where you merge the both messages into one message, after the mapping you can use a filter step to remove the Messages nodes
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.