Stylus Studio XML Editor

Table of contents

Appendices

2.5 Message Reference

Message Reference

The Message Reference Component[top]

The Message Reference Component

A Message Reference component associates a defined type with a message exchanged in an operation. By default, the type system is based upon the XML Infoset [XMLInfoSet].

A message exchange pattern defines a set of placeholder messages that participate in the pattern and assigns them unique message labels within the pattern (e.g. 'In', 'Out'). The purpose of a Message Reference component is to associate an actual message type (XML element declaration or some other declaration (see [Using Other Schema Languages]) for message content) with a message in the pattern, as identified by its message label. Later, when the message exchange pattern is instantiated, messages corresponding to that particular label will follow the type assignment made by the Message Reference component.

The properties of the Message Reference component are as follows:

  • {message label} REQUIRED. A wsdls:NCName as defined by [ Type]. This property identifies the role this message plays in the {message exchange pattern} of the Interface Operation component this is contained within. The value of this property MUST match the name of a placeholder message defined by the message exchange pattern.

  • {direction} REQUIRED. A wsdls:Token with one of the values in or out, indicating whether the message is coming to the service or going from the service, respectively. The direction MUST be the same as the direction of the message identified by the {message label} property in the {message exchange pattern} of the Interface Operation component this is contained within.

  • {message content model} OPTIONAL. A wsdls:token with one of the values #any, #none, or #element. A value of #any indicates that the message content is any single element. A value of #none indicates there is no message content. A value of #element indicates that the message consists of a single element described by the global element declaration reference by the {element} property.

  • {element} OPTIONAL. A reference to an XML element declaration in the {element declarations} property of [The Definitions Component]. This element represents the content or "payload" of the message. When the {message content model} property has the value #any or #none the {element} property MUST be empty.

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

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

If a type system not based upon the XML Infoset is in use (as considered in [Using Other Schema Languages]) then additional properties would need to be added to the Message Reference Component (along with extensibility attributes to its XML representation) to allow associating such message types with the message reference.

For each Message Reference component in the {message references} property of an Interface Operation component, its {message label} property MUST be unique.

XML Representation of Message Reference Component[top]

XML Representation of Message Reference Component
<definitions>
  <interface>
    <operation>
      <input
            messageLabel="xs:NCName"?
            element="union of xs:QName, xs:Token"? >
        <documentation />?
        [ <feature /> | <property /> ]*
      </input>
      <output
            messageLabel="xs:NCName"?
            element="union of xs:QName, xs:Token"? >
        <documentation />?
        [ <feature /> | <property /> ]*
      </output>
    </operation>
  </interface>
</definitions>

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

  • A [local name] of input or output

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

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

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

      If the {message exchange pattern} of the Interface Operation component has only one message with a given value for {direction}, then the messageLabel attribute information item is optional for the XML representation of the Message Reference component with that {direction}.

    • An OPTIONAL element 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 item 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:

messageLabel attribute information item with input, or output [owner][top]

messageLabel attribute information item with input, or output [owner]

The messageLabel attribute information item identifies the role of this message in the message exchange pattern of the given operation element information item.

The messageLabel attribute information item has the following Infoset properties:

  • A [local name] of messageLabel

  • A [namespace name] which has no value

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

element attribute information item with input, or output [owner][top]

element attribute information item with input, or output [owner]

The element attribute information item has the following Infoset properties:

  • A [local name] of element.

  • A [namespace name] which has no value.

The type of the element attribute information item is a union of xs:QName and xs:Token where the allowed token values are #any or #none.

Mapping Message Reference's XML Representation to Component Properties[top]

Mapping Message Reference's XML Representation to Component Properties

The mapping between the properties of the Message Reference component (see [The Message Reference Component]) and the XML Representation of the message reference element information item (see [XML Representation of Message Reference Component]) is as described in [tab_MessageReference_Mapping].

1tab_MessageReference_Mapping Mapping between Message Reference Component Properties and XML Representation Property Mapping
11{message label} 11The actual value of the messageLabel attribute information item if any; otherwise the {message label} property of the message with same {direction} from the {message exchange pattern} of the Interface Operation component, provided there is exactly one such message; otherwise it is an error.
11{direction} 11If the [local name] of the element information item is input then in, else if the [local name] of the element information item is output then out.
11{message content model} 11If the element attribute information item is present and its value is a QName, then #element. Otherwise the actual value of the element attribute information item, if any, otherwise empty.
11{element} 11 If the element attribute information item is present and its value is a QName, then the element declaration from the {element declarations} property of [The Definitions Component] resolved to by the value of the element attribute information item, otherwise empty. It is an error for the element attribute information item to have a value and for it to not resolve to a global element declaration from the {element declarations} property of [The Definitions Component].
11{features} 11 The set of Feature components corresponding to the feature element information items in [children], if any.
11{properties} 11 The set of Property components corresponding to the property element information items in [children], if any.