Previous Page Arrow Next Page Arrow

4 Metadata

SData services expose their metadata in XSD (XML Schema) format. This information is vital for generic service consumers because it allows them to dynamically discover what the service exposes (which resource kinds, which service operations) as well as the associated formats (resource payloads, input/output messages for service operations). In short, the schema defines the SData contract that exists between the provider and its consumers.

An SData consumer needs more information than what is conveyed by a standard XML Schema. SData defines a set of XSD extensions that are applied to schema elements.

Also, SData imposes some rules on the way the schema should be structured. These rules have been introduced so that service consumers can easily extract useful information from SData schemas. Without such rules, the information would be difficult to extract because XSD is a very versatile language and different producers would adopt different XSD patterns.

This section starts with an example of a typical SData schema.

The following subsection describe the main parts of the example:

This is followed by a section that describes how polymorphic relations are defined and then a subsection that summarizes the SData XSD extensions, called Simple Metadata Extensions or SME.

Also included is a subsection that summarizes the rules that SData schemas should follow and gives additional information on schema validation and schema localization.

The following subsection describes how schema fragments can be inlined inside feeds to improve performance on mobile devices.

The last subsection describes how schemas can import or include other schemas.


Previous Page Arrow Next Page Arrow