Skip to Content
0
Jan 14, 2023 at 06:38 PM

#SCPI: error in JSON request to S4 using OData V2 receiver adapter

484 Views

Hi Experts,

Is it not possible to send JSON format (POST operation) to S4H system using ODATA V2 receiver adapter?

As per below thread, it not possible to send JSON format using OData V2 adapter, we need to use only HTTP adapter.
But as per the below SAP Note, OData supports JSON format.

image.png

am getting below error while trying to send the data to S4H using OdataV2 adapter :

Error Details

com.sap.gateway.core.ip.component.odata.exception.OsciException: Request Payload Parsing Failed for one of the reason: (1) Either the OData metadata content available in the server is outdated OR (2) The request payload seems to be incorrect. Error Details : only whitespace content allowed before start tag and not " (position: START_DOCUMENT seen "... @1:1) , org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not " (position: START_DOCUMENT seen "... @1:1)

But the JSON structure is working absolutely fine in the Gateway of S4 system where am getting 201 as status code.
I have used the header as:
Content-type: application/json
I have tried the Content Type Encoding as UTF-8 also but no luck.

image.png

Any Suggestions please ?

Attachments

image.png (79.5 kB)
image.png (58.2 kB)