Skip to Content
avatar image
Former Member

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

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • May 31, 2017 at 04:13 PM

    Hi Krishna,

    After the system got updated and adapter applications got new features (such as the enhanced XML/JSON conversion), please make sure that adapter metadata is also updated - otherwise, UI for channel configuration in NWDS / Integration Directory may still miss newly introduced configuration parameters in the channel. You might check SAP Note 2276231 ("New features for REST adapter in 740 SPS13 are not visible") that contains detailed explanation on how this can be achieved.



    Add comment
    10|10000 characters needed characters exceeded