cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Integration Suite - How to execute POST using OData Adapter?

former_member601123
Participant

Hello,

I´m working on an integration flow where i execute an HTTP Request and retrieve some info, the i transform that information to a new structure that is sent to the SAP Backend using an OData service.

I´m trying to send this payload to the OData service, the payload was configured on the content modifier 2.

I have tested this payload on the Gateway client and Postman and seems to work fine, i got status 201 created and the response body correctly.

However, when trying to do the same on SAP CPI i´m getting the next error, when executing the OData request:

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 : Entity Set entry not found in the edmx.

The OData adapter is configured to process a POST.

Checking the IWFND/TRACES the request executed a GET, but not the POST with the payload shown above.

What´s the right way to execute POST to an OData service?

Akash
Participant
0 Kudos
If the issue is resolved please help
View Entire Topic
manoj_khavatkopp
Active Contributor

Hi Sergio,

The reason why you see GET and not POST in IWFND/TRACES is because internally for POST call ODATA adapter perform the first GET call to fetch the x-csrf-token and then do the actual POST call with the fetched data.

So as suggested above try to push data in simple xml format, if the problem still persists try to delete the existing edmx file and generate a new one using ODATA modeller of the channel and then re-push the data.

Thanks,

Manoj

former_member601123
Participant
0 Kudos

Hello manoj.khavatkopp

thank you for clarifing, now i´m trying to push data in a simple XML, however, i´m still getting an error. I don´t understand what´s wrong with my payload.

<ConsultaTrmSet>
<IFecha>2021-07-29T00:00:00</IFecha>
<IValorTrm>3918.49</IValorTrm>
</ConsultaTrmSet>