Stylus Studio XML Editor

Table of contents

Appendices

2.9 Binding

Binding

The Binding Component[top]

The Binding Component

A Binding component describes a concrete message format and transmission protocol which may be used to define an endpoint (see [Endpoint]). That is, a Binding component defines the implementation details necessary to accessing the service.

Binding components can be used to describe such information in a re-usable manner for any interface or specifically for a given interface. Furthermore, binding information MAY be specified on a per-operation basis (see [The Binding Operation Component]) within an interface in addition to across all operations of an interface.

If a Binding component specifies any operation-specific binding details (by including Binding Operation components) or any fault binding details (by including Binding Fault components) then it MUST specify an interface the Binding component applies to, so as to indicate which interface the operations come from.

Conversely, a Binding component which omits any operation-specific binding details and any fault binding details MAY omit specifying an interface. Binding components that do not specify an interface MAY be used to specify operation-independent binding details for Service components with different interfaces. That is, such Binding components are reusable across one or more interfaces.

No concrete binding details are given in this specification. The companion specification, WSDL (Version 2.0): Bindings [WSDL-PART3] defines such bindings for SOAP 1.2 [SOAP12-PART1] and HTTP [RFC2616]. Other specifications MAY define additional binding details. Such specifications are expected to annotate the Binding component (and its sub-components) with additional properties and specify the mapping between those properties and the XML representation.

A Binding component which defines bindings for an Interface component MUST define bindings for all the operations of that Interface component. The bindings may occur via defaulting rules which allow one to specify default bindings for all operations (see, for example [WSDL-PART3]) or by directly listing each Operation component of the Interface component and defining bindings for them. Thus, it is an error for a Binding component to not define bindings for all the Operation components of the Interface component for which the Binding component purportedly defines bindings for.

Bindings are named constructs and can be referred to by QName (see [QName resolution]). For instance, Endpoint components refer to bindings in this way.

The properties of the Binding component are as follows:

  • {name} REQUIRED. A wsdls:NCName as defined by [ Type].

  • {target namespace} REQUIRED. A wsdls:anyURI as defined in [ Type].

  • {interface} OPTIONAL. An Interface component indicating the interface for which binding information is being specified.

  • {type} REQUIRED. A wsdls:anyURI as defined by [ Type]. This URI MUST be absolute as defined by [RFC2396]. The value of this URI indicates what kind of concrete binding details are contained within this Binding component. Specifications (such as [WSDL-PART3] ) that define such concrete binding details MUST specify appropriate values for this property. The value of this property MAY be the namespace name of the extension elements or attributes which define those concrete binding details.

  • {faults} OPTIONAL. A set of Binding Fault components.

  • {operations} OPTIONAL. A set of Binding Operation components.

  • {features} OPTIONAL. A set of Feature components.

  • {properties} OPTIONAL. A set of Property components.

For each Binding component in the {bindings} property of a definitions container, the combination of {name} and {target namespace} properties must be unique.

XML Representation of Binding Component[top]

XML Representation of Binding Component
<definitions>
  <binding
        name="xs:NCName" 
        interface="xs:QName"?
        type="xs:anyURI" >
    <documentation />?
    [ <fault /> | <operation /> | <feature /> | <property /> ]*
  </binding>
</definitions>

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

  • A [local name] of binding

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

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

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

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

    • An REQUIRED type 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 element information items from among the following, in any order:

name attribute information item with binding [owner][top]

name attribute information item with binding [owner]

The name attribute information item together with the targetNamespace attribute information item of the definitions element information item forms the QName of the binding.

The name attribute information item has the following Infoset properties:

  • A [local name] of name

  • A [namespace name] which has no value

The type of the name attribute information item is xs:NCName.

interface attribute information item with binding [owner][top]

interface attribute information item with binding [owner]

The interface attribute information item refers, by QName, to an Interface component.

The interface attribute information item has the following Infoset properties:

  • A [local name] of interface

  • A [namespace name] which has no value

The type of the interface attribute information item is xs:QName.

type attribute information item with binding [owner][top]

type attribute information item with binding [owner]

The type attribute information item identifies the kind of binding details contained in the Binding component.

The type attribute information item has the following Infoset properties:

  • A [local name] of type

  • A [namespace name] which has no value

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

Binding extension elements[top]

Binding extension elements

Binding extension elements are used to provide information specific to a particular binding. The semantics of such element information items are defined by the specification for those element information items. Such specifications are expected to annotate the Binding component with additional properties and specify the mapping between those properties and the XML representation.

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

Mapping Binding's XML Representation to Component Properties

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

1tab_Binding_Mapping Mapping between Binding Component Properties and XML Representation Property Mapping
11{name} 11The actual value of the name attribute information item
11{target namespace} 11 The actual value of the targetNamespace attribute information item of the [parent] definitions element information item.
11{interface} 11 The Interface component resolved to by the actual value of the interface attribute information item, if any.
11{type} 11 The actual value of the type attribute information item.
11{faults} 11The set of Binding Fault components corresponding to the fault element information items in [children], if any.
11{operations} 11The set of Binding Operation components corresponding to the operation element information items in [children], if any.
11{features} 11The set of Feature components corresponding to the feature element information items in [children], if any.
11{properties} 11The set of Property components corresponding to the property element information items in [children], if any.