cancel
Showing results for 
Search instead for 
Did you mean: 

odata CREATE SERVICE (post)ISSUE "The server is refusing to process the request because the entity has an unsupported format"

Former Member
0 Kudos

<feed xmlns="http://www.w3.org/2005/Atom" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xml:base="http://ULABSMDG27.ugi.com:8000/sap/opu/odata/sap/Z_FIORI_CREATE_EQUIPMENT_SRV/">

  <id>http://ULABSMDG27.ugi.com:8000/sap/opu/odata/sap/Z_FIORI_CREATE_EQUIPMENT_SRV/Z_EquipmentCreateSet</id>

  <title type="text">Z_EquipmentCreateSet</title>

  <updated>2015-11-10T09:57:56Z</updated>

  <author>

   <name/>

  </author>

  <link href="Z_EquipmentCreateSet" rel="self" title="Z_EquipmentCreateSet"/>

  <entry>

   <id>http://ULABSMDG27.ugi.com:8000/sap/opu/odata/sap/Z_FIORI_CREATE_EQUIPMENT_SRV/Z_EquipmentCreateSet('10000004')</id>

   <title type="text">Z_EquipmentCreateSet('10000004')</title>

   <updated>2015-11-10T09:57:56Z</updated>

   <category term="Z_FIORI_CREATE_EQUIPMENT_SRV.Z_EquipmentCreate" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>

   <link href="Z_EquipmentCreateSet('10000004')" rel="edit" title="Z_EquipmentCreate"/>

   <content type="application/xml">

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

     <d:Equipment>10000004</d:Equipment>

     <d:Manfacture>SAP</d:Manfacture>

     <d:Descript>ODATA TEST</d:Descript>

     <d:Maintplant>0001</d:Maintplant>

     <d:Funcloc>ABCD-TER-RR-12</d:Funcloc>

     <d:Equicatgry>M</d:Equicatgry>

     <d:ExternalNumber>10000004</d:ExternalNumber>

     <d:Objecttype/>

     <d:Manmodel>asded- 1234 -344</d:Manmodel>

    </m:properties>

   </content>

  </entry>

</feed>

Here is my pay load for the create operation for POST , I could not understand the solution provide in other discussions, could you please guide me on what error is there in my payload.

HTTP Request properties

X-CSRF-TokenJ0LthASUesoef5I3HzvcyQ==
Content-Typeapplication/atom+xml;type=feed; charset=utf-8

Accepted Solutions (0)

Answers (2)

Answers (2)

you should implement method getEntity,then read single data in sap gateway client, you will see http response in right window, click 'use as request', after that change the data in left window, don't forget to change http method from 'read' to 'post'.

if you use getEntitySet to do read, then it will display the error above.

hope to help you.

AshwinDutt
Active Contributor
0 Kudos

Hello Rupesh,

What is the operation you are performing here ?

Deep Entity Creation ( Header and Items ) or just a Create ( flat structure ) ?

Please correct the payload. Use the below and check.

Pass Header ' Content-Type - application/xml ' .

HTTP Method ' POST '

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

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

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

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

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

  <m:properties>

    <d:Equipment>10000004</d:Equipment>

    <d:Manfacture>SAP</d:Manfacture>

    <d:Descript>ODATA TEST</d:Descript>

    <d:Maintplant>0001</d:Maintplant>

    <d:Funcloc>ABCD-TER-RR-12</d:Funcloc>

    <d:Equicatgry>M</d:Equicatgry>

    <d:ExternalNumber>10000004</d:ExternalNumber>

    <d:Objecttype/>

    <d:Manmodel>asded- 1234 -344</d:Manmodel>

  </m:properties>

  </atom:content>

</atom:entry>

Regards,

Ashwin

Former Member
0 Kudos

http://scn.sap.com/thread/3826188

Hi Ashwini,

Thanks for the Help.

I am currently getting a issue from the same impl. Could you please help. Discussion link is attached above.

Thanks

Rupesh