13.2 Metadata Extension for Batching
The schema indicates how batching is supported for a resource kind. This is indicated by adding an sme:batchingMode element to the element that describes the resource kind in the schema. See Resource Kind Definition section. For example:
<xs:element name="salesOrder" type="tns:salesOrderType" sme:role="resourceKind" sme:pluralName="salesOrders" sme:label="Sales Order" sme:canGet="true" sme:canPost="true" sme:canPut="true" sme:canDelete="true" sme:canPageNext="true" sme:canPagePrevious="true" sme:canPageIndex="true" sme:supportsETag="true" **sme:batchingMode="syncOrAsync"** />
This attribute can take the following values:
Value | Description |
---|---|
none | Batching is not supported - this is the default when attribute is omitted. |
sync | Batching is only supported in synchronous mode. |
async | Batching is only supported in asynchronous mode. |
syncOrAsync | Batching is supported in both synchronous and asynchronous modes. |
This attribute allows the generic SData consumer to discover whether batch requests are supported or not for a resource kind.
SData providers MUST set the sme:batchingMode attribute to a value other than none on all resource kinds that support the batching protocol.