cancel
Showing results for 
Search instead for 
Did you mean: 

SAP CPI Merge different payloads to single

0 Kudos

Hi ,

I have a scenario where I need to merge the response of api call to input payload.  Please  suggest how this can be achieved.

InputPayload (Json) -> convert to xml -> use message mapping to map the input payload fields to api fields -> trigger api call -> response returned is in xml format (add it to the InputPayload ??) 

Wes_Ancog
Explorer
0 Kudos

store the input payload to a property, after you receive the xml response from the api, call the property and add the response.

bdBais
Explorer
0 Kudos

InputPayload (Json) -> convert to xml -> use message mapping to map the input payload fields to api fields -> trigger api call -> response returned is in xml format, merge xml input with xml output, create a mapping that merge them on last output --> convert to json --->send payload.

 

Save xml InputPayload into a property and put a Message Modifier where body is merged  xml

 

<root>

<input>${property.InputPayloadXML}</input>

<data>${body}</data>

</root>

 

so you can merge them from input and attach data (if you have a key to find them) 🙂

Accepted Solutions (0)

Answers (0)