I am trying to do a posting via OData Service for multiple related entries via the same payload using inline feed. There is a header entity set and item entity set with the right association. The query and the read works fine and I copied and pasted the response from the query with expand on as a post message.
I pasted the attached xml in validator and everything looks ok. But when I do a post via the gateway client I get the error:
<?xml version="1.0" encoding="utf-8" ?>
-<error xmlns="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
<code>CX_SXML_PARSE_ERROR/001560AA0E081DEB8CA398D5EBFB9406</code>
<message xml:lang="en">Error while parsing an XML stream: 'BOM / charset detection failed'.</message>-<innererror>
<transactionid>5277F663B13A7115E10000000A444B55</transactionid>
</innererror>
I am really lost and do not know what the reason for the error is. Any help would be greatly appreciated.
Kind Regards,
Aravind.
The attributes for posting:
![Capture_Posting.JPG]()
Attached XML:
<?xml version="1.0" encoding="utf-8"?>
<entry xml:base="https://ldciqi5.wdf.sap.corp:44318/sap/opu/odata/sap/ZAR_TEST_PROMO_READ_QUERY_SRV/" 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">
<id>https://ldciqi5.wdf.sap.corp:44318/sap/opu/odata/sap/ZAR_TEST_PROMO_READ_QUERY_SRV/PROMOTION_HEADERCollection</id>
<title type="text">PROMOTION_HEADERCollection</title>
<updated>2013-11-04T17:13:19Z</updated>
<author>
<name/>
</author>
<link href="PROMOTION_HEADERCollection" rel="self" title="PROMOTION_HEADERCollection"/>
<entry>
<id>https://ldciqi5.wdf.sap.corp:44318/sap/opu/odata/sap/ZAR_TEST_PROMO_READ_QUERY_SRV/PROMOTION_HEADERCollection</id>
<title type="text">PROMOTION_HEADERCollection</title>
<updated>2013-11-04T17:13:19Z</updated>
<category term="ZAR_TEST_PROMO_READ_QUERY_SRV.PROMOTION_HEADER" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link href="PROMOTION_HEADERCollection" rel="self" title="PROMOTION_HEADER"/>
<link href="PROMOTION_HEADERCollection/PROMOTION_HEADERPROMOTIONITEMS" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/PROMOTION_HEADERPROMOTIONITEMS" type="application/atom+xml;type=feed" title="PROMOTION_HEADERPROMOTIONITEMS">
<m:inline>
<feed xmlns="http://www.w3.org/2005/Atom" xml:base="https://ldciqi5.wdf.sap.corp:44318/sap/opu/odata/sap/ZAR_TEST_PROMO_READ_QUERY_SRV/">
<id>https://ldciqi5.wdf.sap.corp:44318/sap/opu/odata/sap/ZAR_TEST_PROMO_READ_QUERY_SRV/PROMOTION_HEADERCollection('100000000')/PROMOTION_HEADERPROMOTIONITEMS</id>
<title type="text">PROMOTION_ITEMCollection</title>
<updated>2013-11-04T17:13:19Z</updated>
<author>
<name/>
</author>
<link href="PROMOTION_HEADERCollection/PROMOTION_HEADERPROMOTIONITEMS" rel="self" title="PROMOTION_ITEMCollection"/>
<entry>
<id>https://ldciqi5.wdf.sap.corp:44318/sap/opu/odata/sap/ZAR_TEST_PROMO_READ_QUERY_SRV/PROMOTION_ITEMCollection('R100011')</id>
<title type="text">PROMOTION_ITEMCollection('R100011')</title>
<updated>2013-11-04T17:13:19Z</updated>
<category term="ZAR_TEST_PROMO_READ_QUERY_SRV.PROMOTION_ITEM" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link href="PROMOTION_ITEMCollection('R100011')" rel="self" title="PROMOTION_ITEM"/>
<content type="application/xml">
<m:properties>
<d:Material>R100011</d:Material>
<d:MatlDesc>Basketball 'Professional'</d:MatlDesc>
<d:SalesUnit>PCE</d:SalesUnit>
<d:MatlCat>00</d:MatlCat>
<d:MatlGroup>R1132</d:MatlGroup>
<d:ItemNo>000001</d:ItemNo>
<d:PlndSalesQty>2800.000</d:PlndSalesQty>
<d:SalesPrice>13.9500</d:SalesPrice>
<d:SalesCurrency>USD</d:SalesCurrency>
<d:SalesPrUnit>1</d:SalesPrUnit>
<d:OrderFrom m:null="true"/>
<d:OrderTo m:null="true"/>
<d:DeliveryFrom>2014-06-15T00:00:00</d:DeliveryFrom>
<d:DeliveryTo>2014-06-17T00:00:00</d:DeliveryTo>
<d:AllocUnit>PCE</d:AllocUnit>
<d:BlockReason/>
<d:BlockReasnDesc/>
<d:BlockDate m:null="true"/>
<d:RebValue>0.0000</d:RebValue>
<d:RebPerc>0.00</d:RebPerc>
</m:properties>
</content>
</entry>
<entry>
<id>https://ldciqi5.wdf.sap.corp:44318/sap/opu/odata/sap/ZAR_TEST_PROMO_READ_QUERY_SRV/PROMOTION_ITEMCollection('R100012')</id>
<title type="text">PROMOTION_ITEMCollection('R100012')</title>
<updated>2013-11-04T17:13:19Z</updated>
<category term="ZAR_TEST_PROMO_READ_QUERY_SRV.PROMOTION_ITEM" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme"/>
<link href="PROMOTION_ITEMCollection('R100012')" rel="self" title="PROMOTION_ITEM"/>
<content type="application/xml">
<m:properties>
<d:Material>R100012</d:Material>
<d:MatlDesc>Skateboard Hells Bells Test change</d:MatlDesc>
<d:SalesUnit>PCE</d:SalesUnit>
<d:MatlCat>00</d:MatlCat>
<d:MatlGroup>R1132</d:MatlGroup>
<d:ItemNo>000002</d:ItemNo>
<d:PlndSalesQty>2000.000</d:PlndSalesQty>
<d:SalesPrice>69.0000</d:SalesPrice>
<d:SalesCurrency>USD</d:SalesCurrency>
<d:SalesPrUnit>1</d:SalesPrUnit>
<d:OrderFrom m:null="true"/>
<d:OrderTo m:null="true"/>
<d:DeliveryFrom>2014-06-15T00:00:00</d:DeliveryFrom>
<d:DeliveryTo>2014-06-17T00:00:00</d:DeliveryTo>
<d:AllocUnit>PCE</d:AllocUnit>
<d:BlockReason/>
<d:BlockReasnDesc/>
<d:BlockDate m:null="true"/>
<d:RebValue>0.0000</d:RebValue>
<d:RebPerc>0.00</d:RebPerc>
</m:properties>
</content>
</entry>
</feed>
</m:inline>
</link>
<link href="PROMOTION_HEADERCollection/$links/PROMOTION_HEADERPROMOTIONITEMS" rel="http://schemas.microsoft.com/ado/2007/08/dataservices/relatedlinks/PROMOTION_HEADERPROMOTIONITEMS" type="application/xml" title="PROMOTION_HEADERPROMOTIONITEMS"/>
<content type="application/xml">
<m:properties>
<d:Promotion>100000000</d:Promotion>
<d:PromName>Promotion Sports</d:PromName>
<d:PromotionType>0001</d:PromotionType>
<d:Status>A</d:Status>
<d:SalesOrg/>
<d:DistrChan/>
<d:OnSaleFrom>2014-06-18T00:00:00</d:OnSaleFrom>
<d:OnSaleTo>2014-06-26T00:00:00</d:OnSaleTo>
<d:OrderFrom>2014-06-18T00:00:00</d:OrderFrom>
<d:OrderTo>2014-06-26T00:00:00</d:OrderTo>
</m:properties>
</content>
</entry>
</entry>