on ‎2023 Jan 14 6:38 PM
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.

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.

Any Suggestions please ?
Request clarification before answering.
Hi Mani,
The data feed into the ODATA adapter should be XML. If you select content type as JSON, it will automatically convert that XML to JSON at the adapter level.
Please make sure, the payload is of XML format before using the adapter step.
Regards,
Priyanka
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 4 | |
| 3 | |
| 3 | |
| 3 | |
| 3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.