cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

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

mk_eventmesh
Explorer
0 Likes
2,586

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 ?

Accepted Solutions (1)

Accepted Solutions (1)

PriyankaChak
SAP Champion
SAP Champion

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

paridhi_2229
Discoverer
0 Likes

Hi Priyanka ,

I am facing a similar issue while using the Content Enricher .

I am getting below error com.sap.gateway.core.ip.component.odata.exception.OsciException: Bad Request : 400 : HTTP/1.1

Could you please help .

Thank you.

Answers (0)