cancel
Showing results for 
Search instead for 
Did you mean: 

HTTP Sender ,HCI Odata Receiver Multiple Entity Set ,Unable to POST the data

0 Kudos

Hi Experts,

We are doing a HTTP to OData Scenario,where the OData Receiver has multiple entity Sets. OData is from a gateway OData Receiver.

The error which we are facing is trying to post the data from POSTMAN:

"Bad Request : 400 : HTTP/1.1 <?xml version="1.0" encoding="utf-8"?><error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><code>005056A509B11ED1BDD3D7B1A3B4C509</code><message xml:lang="en">The request URI is not valid. The segment 'POSet' refers to an entity set and not to a single entity</message><innererror xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">"

PFB Screenshots of the Receiver OData Configuration :

Note :

The receiver system, is on the cloud and not on-premise.


Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi Shreyas,

Please could you share the format of data from the sender. Is its JSON ?, then you could directly use the HTTP receiver adapter without using the converter step to send data to the OData receiver.

I am not sure why this defaultTenant is getting added, this should be checked.

Regards,

Gayathri

0 Kudos

Yes the format of the data is in JSON. Given below is the format of the data.

{

"root_element" :

{

"key":"value",

"key":"value",

"key":"value",

"element" :{

"key":"value",

"key":"value",

}

,

"itemlist" [

"key":"value",

"key":"value",

"key":"value",

},

{

"key":"value",

"key":"value",

"key":"value",

}

]

"additem":[

{

"key":"value",

"key":"value",

},

{

"key":"value",

"key":"value",

}

]

}

}

We even tried with the receiver adapter as HTTP but we were facing some problemswith CSRF-tokens.

Answers (2)

Answers (2)

0 Kudos

Hi Gayathri,

Yes I did do the modelling and there were multiple entity sets,that were shown and I selected the POSet which was required.

PFB screenshot of the model operation :

PFB screenshot of the scenario :

The problem that we were facing was the converted XML format from the converter is not accpeted by the OData receiver,

I.e there is a format mismatch of the XML payload of the converter and OData.

Also on the receiver side if we give the connection details as per below screenshot :

Then we get the following error on the postman :

An internal server error occured: Request Payload: Either the OData metadata content available in the server is outdated or the request payload seems to be incorrect = http://ip_address:8080/sap/opu/odata/sap/ZMOH_PO_CREATION_SRV_defaultTenant with error => No such entity found in the edmx.

My doubt is that why a _defaultTenant gets added in this URL:

http://ip_address:8080/sap/opu/odata/sap/ZMOH_PO_CREATION_SRV_defaultTenant .even though we have given the entity set.

Please suggest a way tackle this issue.

Thanks and Regards

Sreyas


0 Kudos

Hi Shreyas,

The error states bad request, so looks like there is an issue in the resource path. Try by selecting a single entity. Please could you try remodeling the request using the inbuilt tool modeler?

Regards,

Gayathri