Skip to Content
May 31, 2017 at 11:03 AM

Adding Namespace with Prefix - XML/JSON Conversion in Receiver REST Adapter

1567 Views Last edit May 31, 2017 at 12:51 PM 3 rev

Hi Experts,

I am in the midst of developing an IDOC to REST asynchronous scenario with POST operation.
While configuring the Receiver REST Adapter, i checked the box for converting XML to JSON. The converted JSON message looks like this

{"Price":{ "Item":{ "itemID":"******", "sales_price":{ "Country":"CL", "Value":13003, "Currency":"CLP", "salePriceEffectiveDate":20170403 } } } }

This returns a HTTP 500 Internal Server Error in the Receiver REST Adapter.

However, the following JSON message is successfully sent to the REST Receiver when using the Google Postman

{ "ns0:Price": { "@xmlns:ns0": "http://****Price***", "Item": { "itemID": "******", "sales_price": { "Country": "CL", "Value": "13003", "Currency": "CLP", "salePriceEffectiveDate": "20170403" } } }

I am on SAP PO 7.5 and I do not see any option to add a Namespace Prefix to the output message in the adapter.

Can you kindly help me out here ?


xml-to-json.jpg (58.5 kB)