cancel
Showing results for 
Search instead for 
Did you mean: 

400 : BAD REQUEST

Former Member
0 Kudos

Dear Experts ,

             i am facing an error while i am creating a salesorder in ODATA service.  please share your knowledge to solve this problem.

Thank you

Venkatesh

Accepted Solutions (0)

Answers (2)

Answers (2)

AshwinDutt
Active Contributor
0 Kudos

If its a flat Structure ,Create your payload as below sample one and pass Content-Type as application/atom+xml

<?xml version="1.0" encoding="utf-8"?>

<atom:entry

xmlns:atom="http://www.w3.org/2005/Atom"

xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices"

xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">

<atom:content type="application/xml">

<m:properties>

<d:AirlineId>AA</d:AirlineId>

<d:ConnectionNo>17</d:ConnectionNo>

<d:FlightDate>2011-12-21T00:00:00</d:FlightDate>

<d:CustomerNo>00000276</d:CustomerNo>

<d:Agency>00000055</d:Agency>

</m:properties>

</atom:content>

</atom:entry>


If you are trying to Create SO and Its item details then you will have to implement Create Deep Entity.


Please confirm what is you are trying to do here.

Former Member
0 Kudos

Hi Ashwin,

   

      Thanks for your valuable suggestion , i have  a requirement to pass different values to the  particular fiels ( example : 'agency' field in your payload data , i want to pass different values to the Agency field ) . how to achieve this ?? i dont have any idea . so , please give me your suggestions .

Thank you.

Former Member
0 Kudos

Hi Aswin i followed your payload sales order is creating but it still showing error .

AshwinDutt
Active Contributor
0 Kudos

Bad request can come for many reasons.Please debug and check why its raising exception.

Former Member
0 Kudos

hello Ashwin,

      Thanks for your valuable suggestion , i have  a requirement to pass different values to the  particular fiels ( example : 'agency' field in your payload data , i want to pass different values to the Agency field ) . how to achieve this ?? i dont have any idea . so , please give me your suggestions .

Thank you.

AshwinDutt
Active Contributor
0 Kudos

Hello Venkat,

Check by passing the below value as Content-Type.

application/xml or application/atom+xml

Regards,

Ashwin