3.8 Resource Payload
The Atom entry contains an XML payload, which contains the resource data. In the example entry this payload is:
<sdata:payload> <salesOrder sdata:key="43660" xmlns="http://schemas.sage.com/myContract"> <orderDate>2001-07-01</orderDate> <shipDate xsi:nil="true" /> <contact sdata:key="216" sdata:url="http://www.example.com/sdata/myApp/myContract/-/contacts('216')" sdata:lookup="http://www.example.com/sdata/myApp/myContract/-/contacts"/> <orderLines sdata:url="http://www.example.com/sdata/myApp/myContract/-/salesOrderLines?where=salesOrderID%20eq%2043660"/> <subTotal>1553.1035</subTotal> </salesOrder> </sdata:payload>
The resource payload is in a different namespace. If the service interface is defined by a contract, namespace will be the contract's namespace. Otherwise, it will be a product specific namespace. In the example this ishttp://schemas.sage.com/myContractThe namespace can be dataset dependent if different datasets expose different schemas.
If a property has a null value, such as shipDate property in the example, it MUST be represented by an empty element with an xsi:nil=”true” attribute, rather than by the absence of the element. This convention is important because update operations can only send properties that have been modified. It allows an SData provider to tell the difference between a property that is reset to null and a property that doesn't change value.
Unless stated otherwise, SData providers MUST include the payload element in feed entries.