on 02-22-2023 3:45 PM
hi All,
I have a requirement to send json data to an Odata service in SAP ECC system using OData adapter in SAP CPI. As Odata receiver adapter accepts only XML input, I have converted the payload from json to XML and then sending to OData. During this conversion, an XML root node is added to make the XML valid as there are multiple records.
Is there any way to remove this 'root' node addition before sending it to OData adapter?
json payload :
{"shipperRefDocuments":[ { "docId":"000000600", "shipment_id":"", "docType_code":"" }, { "docId":"", "shipment_id":"", "docType_code":"" } ],"eta":"","actualTechnicalTimestamp":"","logicalSystem":"","Shipment":"","transportationMode_code":""}Integration Flow:
Any inputs would be much appreciated!
Hi,
yes in this case JSON to XML converter will enforce usage of root element. You can retrieve payload without root element after the conversion with simple XSLT.
BR, Piotr
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Piotr,
Its working now.
Regards,
Smitha
User | Count |
---|---|
75 | |
8 | |
8 | |
8 | |
7 | |
6 | |
5 | |
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.