Stylus Studio XML Editor

Table of contents

Appendices

2.7 Feature

Feature

The Feature Component[top]

The Feature Component

A feature component describes an abstract piece of functionality typically associated with the exchange of messages between communicating parties. Although WSDL poses no constraints on the potential scope of such features, examples might include "reliability", "security", "correlation", and "routing". The presence of a feature component in a WSDL description indicates that the service supports the feature and may require a requester agent that interacts with the service to use that feature. Each Feature is identified by its URI.

The properties of the Feature component are as follows:

  • {name} REQUIRED. A wsdls:anyURI as defined in [ Type]. This URI MUST be absolute as defined by [RFC2396]. This URI SHOULD be dereferenceable to a document that directly or indirectly defines the meaning and use of the Feature that it identifies.

  • {required} REQUIRED. A wsdls:boolean value as defined by [ Type]. If the value of this property is true, then the requester agent MUST use the Feature that is identified by the {name} URI. Otherwise, the requester agent MAY use the Feature that is identified by the {name} URI. In either case, if the requester agent does use the Feature that is identified by the {name} URI, then the requester agent MUST obey all semantics implied by the definition of that Feature.

Feature Composition Model[top]

Feature Composition Model

The set of features which are required or available for a given component consists of the combined set of ALL feature declarations applicable to that component. A feature is applicable to a component if:

  • it is asserted directly within that component, or

  • it is asserted in a containing component, or

  • it is asserted in a component referred to by the current component.

If a given feature is asserted at multiple locations, then the value of that feature at a particular component is that given by the nearest assertion in lexical scoping order. Following these rules, the set of features applicable at each component are as follows:

  • Interface component: all features asserted within the interface component.

  • Interface Fault component: all features asserted within the interface fault component and those within the parent interface component.

  • Interface Operation component: all features asserted within the interface operation component and those within the parent interface component.

  • Message Reference component: all features asserted within the message reference component, those within the parent interface operation component and those within its parent interface component.

  • Binding component: all features asserted within the binding component and those within the interface component referred to by the binding component (if any).

  • Binding Fault component: all features asserted within the binding fault component, those within the parent binding component and those within the interface component referred to by the binding component (if any).

  • Binding Operation component: all features asserted within the binding operation component, those within the parent binding component and those within the interface component referred to by the binding component (if any).

  • Binding Message Reference component: all features asserted within the binding message reference component, those within the parent binding operation component, those within its parent binding component and those within the interface component referred to by the binding component (if any).

Example of Feature Composition Model[top]
Example of Feature Composition Model

In the following example, the depositFunds operation on the BankService has to be used with the ISO9001, the notarization and the secure-channel features; they are all in scope. The fact that the notarization feature is declared both in the operation and in the binding has no effect.

<definitions targetNamespace="http://example.com/bank"
     xmlns:ns1="http://example.com/bank">
  <interface name="ns1:Bank">
    <!-- All implementations of this interface must be secure -->
    <feature uri="http://example.com/secure-channel"
             required="true"/>
    <operation name="withdrawFunds">
      <!-- This operation must have ACID properties -->
      <feature uri="http://example.com/transaction"
               required="true"/>
      ...
    </operation>
    <operation name="depositFunds">
      <!-- This operation requires notarization -->
      <feature uri="http://example.com/notarization"
               required="true"/>
      ...
    </operation>
  </interface>

  <binding name="ns1:BankSOAPBinding">
    <!-- This particular binding requires ISO9001
         compliance to be verifiable -->
    <feature uri="http://example.com/ISO9001"
             required="true"/>
    <!-- This binding also requires notarization -->
    <feature uri="http://example.com/notarization"
             required="true"/>
  </binding>

  <service name="ns1:BankService"
           interface="tns:Bank">
    <endpoint binding="ns1:BankSOAPBinding">
      ...
    </endpoint>
  </service>
</definitions>

XML Representation of Feature Component[top]

XML Representation of Feature Component
<feature
      uri="xs:anyURI" 
      required="xs:boolean"? >
  <documentation />?
</feature>

The XML representation for a Feature component is an element information item with the following Infoset properties:

  • A [local name] of feature

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

  • One or more attribute information items amongst its [attributes] as follows:

    • A REQUIRED uri attribute information item as described below in [ ].

    • An OPTIONAL required attribute information item as described below in [ ].

    • Zero or more namespace qualified attribute information items. The [namespace name] of such attribute information items MUST NOT be http://www.w3.org/2004/08/wsdl.

  • Zero or more element information items amongst its [children], in order as follows:

    1. An OPTIONAL documentation element information item (see [Documentation]).

    2. Zero or more namespace-qualified element information items. The [namespace name] of such element information items MUST NOT be http://www.w3.org/2004/08/wsdl.

uri attribute information item with feature [owner][top]

uri attribute information item with feature [owner]

The uri attribute information item specifies the URI of the feature.

The uri attribute information item has the following Infoset properties:

  • A [local name] of uri

  • A [namespace name] which has no value

The type of the uri attribute information item is xs:anyURI.

required attribute information item with feature [owner][top]

required attribute information item with feature [owner]

The required attribute information item specifies whether the use of the feature is mandatory or optional.

The required attribute information item has the following Infoset properties:

  • A [local name] of required

  • A [namespace name] which has no value

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

Mapping Feature's XML Representation to Component Properties[top]

Mapping Feature's XML Representation to Component Properties

The mapping between the properties of the Feature component (see [The Feature Component]) and the XML Representation of the feature element information item (see [XML Representation of Feature Component]) is as described in [tab_Feature_Mapping].

1tab_Feature_Mapping Mapping between Feature Component Properties and XML Representation Property Mapping
11{name} 11The actual value of the uri attribute information item
11{required} 11 The actual value of the required attribute information item if present, otherwise false.