Stylus Studio XML Editor

Table of contents

Appendices

2.2 Interface

Interface

The Interface Component[top]

The Interface Component

An Interface component describes sequences of messages that a service sends and/or receives. It does this by grouping related messages into operations. An operation is a sequence of input and output messages, and an interface is a set of operations. Thus, an interface defines the design of the application.

An interface can optionally extend one or more other interfaces. To avoid circular definitions, an interface MUST NOT appear as an element of the set of interfaces it extends, either directly or indirectly. An interface contains all the operations defined by the interfaces it extends, along with any operations it directly defines. In the process, operation components that are equivalent per [Equivalence of Components] are treated as one. The interface extension mechanism behaves in a similar way for all other components that can be defined inside an interface, namely Interface Fault, Feature and Property components.

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

The properties of the Interface component are as follows:

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

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

  • {extended interfaces} OPTIONAL. A set of Interface components which this interface extends. This set MUST be closed under the operation of adding the values of the {extended interfaces} properties of all its members.

  • {faults} OPTIONAL. A set of Interface Fault components. This set MUST include the values of the {faults} properties of all the interface definitions that are listed under the {extended interfaces} property of the component.

  • {operations} OPTIONAL. A set of Interface Operation components. This set MUST include the values of the {operations} properties of all the Interface components that are listed under the {extended interfaces} property of the component.

  • {features} OPTIONAL. A set of Feature components. This set MUST include the values of the {features} properties of all the Interface components that are listed under the {extended interfaces} property of the component.

  • {properties} OPTIONAL. A set of Property components. This set MUST include the values of the {properties} properties of all the Interface components that are listed under the {extended interfaces} property of the component.

For each Interface component in the {interfaces} property of a definitions container, the combination of {name} and {target namespace} properties MUST be unique.

Additionally, an Interface component MUST satisfy the Operation Name Mapping requirement, as defined below. This requirement is intended to ensure that a received message can be uniquely mapped to a corresponding wsdl:operation.

Operation Name Mapping Requirement[top]

Operation Name Mapping Requirement

Consider all Interface Operation components specified in the {operations} property of an Interface component. Further, consider all Message Reference components specified in the {message references} properties of said Interface Operation components. Further, consider all said Message Reference components that have the same value for their {direction} property (i.e., either the token in or the token out). If the {message content model} property of any of these Message Reference components has a value of "#any", or if more than one of these Message Reference components has a value of "#none", or if the qualified names of the global element declarations specified by the values of the {element} properties of these Message Reference components are not unique when considered together, then either one of the following two conditions MUST apply:

  1. the {features} property of the Interface component MUST contain a Feature component, having a {required} property with a value of true, that unambiguously identifies the mechanism that a message sender is required to support in order to enable the message recipient to unambiguously determine the name of the Interface Operation component that is intended to be associated with the received message; or

  2. the element information item for the Interface component MUST contain an extension element (i.e., an element that is not in the http://www.w3.org/2004/08/wsdl namespace), having a wsdl:required attribute information item with a value of true, that unambiguously identifies the mechanism that a message sender is required to support in order to enable the message recipient to unambiguously determine the name of the Interface Operation component that is intended to be associated with the received message.

XML Representation of Interface Component[top]

XML Representation of Interface Component
<definitions>
  <interface
        name="xs:NCName" 
        extends="list of xs:QName"?
        styleDefault="list of xs:anyURI"? >
    <documentation />?
    [ <fault /> | <operation /> | <feature /> | <property /> ]*
  </interface>
</definitions>

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

  • A [local name] of interface

  • 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 extends attribute information item as described below in [ ].

    • An OPTIONAL styleDefault 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 interface [owner][top]

name attribute information item with interface [owner]

The name attribute information item together with the targetNamespace attribute information item of the [parent] definitions element information item forms the QName of the interface.

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.

extends attribute information item[top]

extends attribute information item

The extends attribute information item lists the interfaces that this interface derives from.

The extends attribute information item has the following Infoset properties:

  • A [local name] of extends

  • A [namespace name] which has no value

The type of the extends attribute information item is a list of xs:QName.

styleDefault attribute information item[top]

styleDefault attribute information item

The styleDefault attribute information item indicates the default style used to construct the {element} properties of {message references} of all operations contained within the [owner] interface.

The styleDefault attribute information item has the following Infoset properties:

  • A [local name] of styleDefault.

  • A [namespace name] which has no value.

The type of the styleDefault attribute information item is list of xs:anyURI. Moreover, the value of the styleDefault attribute information item, if present, MUST contain absolute URIs (see [RFC2396]).

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

Mapping Interface's XML Representation to Component Properties

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

1tab_Interface_Mapping Mapping between Interface 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{extended interfaces} 11 The set of Interface components resolved to by the values in the extends attribute information item if any, plus the set of Interface components in the {extended interfaces} property of those interface definitions, if any.
11{faults} 11 The set of Interface Fault components corresponding to the fault element information items in [children], if any, plus the set of Interface Fault components in the {faults} property of the Interface components in {extended interfaces}, if any.
11{operations} 11 The set of Interface Operation components corresponding to the operation element information items in [children], if any, plus the set of Interface Operation components in the {operations} property of the Interface components in {extended interfaces}, if any.
11{features} 11 The set of Feature components corresponding to the feature element information items in [children], if any, plus the set of Feature components in the {features} property of the Interface components in {extended interfaces}, if any.
11{properties} 11 The set of Property components corresponding to the property element information items in [children], if any, plus the set of Property components in the {properties} property of the Interface components in {extended interfaces}, if any.

Note that, per [The Interface Component], the Interface components in the {extended interfaces} property of a given Interface component MUST NOT contain that Interface component in any of their {extended interfaces} properties, that is to say, recursive extension of interfaces is disallowed.