Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3354

Re: Create_deep_entity issue

$
0
0

Hello Raja,

 

Problem with the Payload. Please check.

 

Refer the below sample for your reference ->

 

<?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:Id>100</d:Id>

<d:Name>Test</d:Name>

<d:Name2>Test Header2</d:Name2>

</m:properties>

</atom:content>

<atom:link

rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/HeaderItemO"

type="application/atom+xml;type=feed"

title="ZASH_TEST_FOR_PREP_DEMO_SRV.Header_ItemO">

<m:inline>

<atom:feed>

<atom:entry>

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

<m:properties>

<d:IdO>10</d:IdO>

<d:NameO>Test Item11</d:NameO>

</m:properties>

</atom:content>

</atom:entry>

<atom:entry>

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

<m:properties>

<d:IdO>20</d:IdO>

<d:NameO>Test Item12</d:NameO>

</m:properties>

</atom:content>

</atom:entry>

</atom:feed>

</m:inline>

</atom:link>

<atom:link

rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/HeaderItemT"

type="application/atom+xml;type=feed"

title="ZASH_TEST_FOR_PREP_DEMO_SRV.Header_ItemT">

<m:inline>

<atom:feed>

<atom:entry>

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

<m:properties>

<d:IdT>10</d:IdT>

<d:NameT>Test Item21</d:NameT>

</m:properties>

</atom:content>

</atom:entry>

<atom:entry>

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

<m:properties>

<d:IdT>20</d:IdT>

<d:NameT>Test Item22</d:NameT>

</m:properties>

</atom:content>

</atom:entry>

</atom:feed>

</m:inline>

</atom:link>

</atom:entry>

 

You can have JSON payload as well ->

 

{

"Id":"01",

"Name":"Ashwin",

"Name2":"Dutt",

"HeaderItemO":[{"IdO":"10","NameO":"TestO1"},

{"IdO":"20","NameO":"TestO2"}],

"HeaderItemT":[{"IdT":"10","NameT":"TestT1"},

{"IdT":"20","NameT":"TestT2"}]

}

 

 

Where HeaderItemO and HeaderItemT are the navigation properties defined in GW Model.

 

Regards,

Ashwin


Viewing all articles
Browse latest Browse all 3354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>