Table of contentsAppendices |
3.1 Application Data FeatureApplication Data FeatureName[top]NameThis feature is identified with the URI 'http://www.w3.org/2004/08/wsdl/feature/AD' Operation[top]OperationThis feature exists in order to enable the description of application-defined additional data declarations outside of the normal data channel (e.g. the SOAP body). The senders takes the value of the property 'http://www.w3.org/2004/08/wsdl/feature/AD/data', which is defined below, and passes it to the receiver in a manner to be defined by the particular bindings/modules implementing this specification. AD/data Property[top]AD/data PropertyThis property is identified with the URI 'http://www.w3.org/2004/08/wsdl/feature/AD/data'. Description[top]DescriptionThe data property consists of a sequence of elements, each of which represents an individual piece of application data. Implementations of this feature must ensure that the runtime value of this property is correctly transferred from the sender to the receiver. Here is an example of using the data property in a WSDL:
<types>
<schema targetNamespace="http://example.com/ws/wsdl20/my-ws"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:ad="http://www.w3.org/2004/08/wsdl/feature/AD">
<!-- Define the data type we'll use later -->
<complexType name="myDataType">
<sequence>
<!-- These elements are our data -->
<element name="isGoldClubMember" type="xs:boolean"
ad:mustUnderstand="true" />
<element name="promotionalCode"
type="xs:string"
minOccurs="0"/>
</sequence>
</complexType>
</schema>
</types>
<interface name="customerService">
<operation name="reserveCar">
<input element="myNS:reserveCarRequest">
<property uri="http://www.w3.org/2004/08/wsdl/feature/AD/data">
<constraint xmlns:foo="http://example.com/">
foo:myDataType
</constraint>
</property>
</input>
</operation>
</interface>
This example defines two pieces of application data, and associates them with the input message of the "reserveCar" operation. Notice that the "promotionalCode" element is optional (minOccurs="0"). The ad:mustUnderstand Attribute[top]The ad:mustUnderstand AttributeYou may choose to decorate your application data element declarations with an attribute with the namespace 'http://www.w3.org/2004/08/wsdl/feature/AD' and the local name "mustUnderstand". This indicates at the abstract level that the particular element thus decorated is mandatory, and implementations of this feature which support expression of mandatory data (i.e. the Application Data SOAP Module, see [Application Data Module]) should mark them as mandatory in an appropriate way. |