Stylus Studio XML Editor

Table of contents

Appendices

6.1 Element based Extensibility

Element based Extensibility

WSDL allows extensions to be defined in terms of element information items. Where indicated herein, WSDL allows namespace-qualified element information items whose [namespace name] is NOT http://www.w3.org/2004/08/wsdl to appear among the [children] of specific element information items whose [namespace name] is http://www.w3.org/2004/08/wsdl. Such element information items MAY be used to annotate WSDL constructs such as interface, operation, etc.

It is expected that extensions will want to add to the existing properties of components in the component model. The specification for an extension element information item should include definitions of any such properties and the mapping between the XML representation of the extension and the properties in the component model.

The WSDL schema also defines a base type for use by extensibility elements. [Base type for extensibility elements] shows the type definition. The use of this type as a base type is optional. The element declarations which serve as the heads of the defined substitution groups are all of type xs:anyType.

Extensibility elements are commonly used to specify some technology-specific binding. They allow innovation in the area of network and message protocols without having to revise the base WSDL specification. WSDL recommends that specifications defining such protocols also define any necessary WSDL extensions used to describe those protocols or formats.

Base type for extensibility elements

<xs:complexType name='ExtensibilityElement' abstract='true' >
  <xs:attribute ref='wsdl:required' use='optional' />
</xs:complexType>
	  
	  

Mandatory extensions[top]

Mandatory extensions

Extension elements can be marked as mandatory by annotating them with a wsdl:required attribute information item (see [ ]) with a value of true. A mandatory extension is an extension that MAY change the meaning of the element to which it is attached, such that the meaning of that element is no longer governed by this specification. Instead, the meaning of an element containing a mandatory extension is governed by the meaning of that extension. Thus, the definition of the element's meaning is delegated to the specification that defines the extension.

An extension that is NOT marked as mandatory MUST NOT invalidate the meaning of any part of the WSDL document. Thus, a NON-mandatory extension merely provides additional description of capabilities of the service. This specification does not provide a mechanism to mark extension attributes as being required. Therefore, all extension attributes are NON-mandatory.

NOTE: 

A mandatory extension is considered mandatory because it has the ability to change the meaning of the element to which it is attached. Thus, the meaning of the element may not be fully understood without understanding the attached extension. A NON-mandatory extension, on the other hand, can be safely ignored without danger of misunderstanding the rest of the WSDL document.

If a WSDL document declares an extension, Feature or Property as optional (i.e., NON-mandatory), then the provider agent MUST NOT assume that the requester agent supports that extension, Feature or Property, unless the provider agent knows (through some other means) that the requester agent has in fact elected to engage and support that extension, Feature or Property.

On the other hand, a requester agent MAY engage an extension, Feature or Property that is declared as optional in the WSDL document. Therefore, the provider agent MUST support every extension, Feature or Property that is declared as optional in the WSDL document, in addition to supporting every extension, Feature or Property that is declared as mandatory.

NOTE: 

If finer-grain, direction-sensitive control of extensions, Features or Properties is desired, then such extensions, Features or Properties may be designed in a direction-sensitive manner (from requester or from provider) so that either direction may be separately marked required or optional. For example, instead of defining a single extension that governs both directions, two extensions could be defined -- one for each direction.

required attribute information item[top]

required attribute information item

WSDL provides a global attribute information item with the following Infoset properties:

  • A [local name] of required.

  • A [namespace name] of http://www.w3.org/2004/08/wsdl.

  • A [specified] property with a value of true.

The type of the required attribute information item is xs:boolean.