Stylus Studio XML Editor

Table of contents

Appendices

2.6 Fault Reference

Fault Reference

The Fault Reference Component[top]

The Fault Reference Component

A Fault Reference component associates a defined type, specified by an Interface Fault component, to a fault message exchanged in an operation.

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 Fault Reference component is to associate an actual message type (XML element declaration or some other declaration (see [Using Other Schema Languages]) for message content, as specified by an Interface Fault component) with a fault message occurring in the pattern. In order to identify the fault message it describes, the Fault Reference component uses the message label of the message the fault is associated with as a key.

The companion specification [WSDL-PART2] defines two fault patterns that a given message exchange pattern may use. For the pattern fault-replaces-message, the message that the fault relates to identifies the message in place of which the declared fault message will occur. Thus, the fault message will travel in the same direction as the message it replaces in the pattern. For the pattern message-triggers-fault, the message that the fault relates to identifies the message after which the indicated fault may occur, in the opposite direction of the referred to message. That is, the fault message will travel in the opposite direction of the message it comes after in the pattern.

More than one Fault Reference component may refer to the same message label. This allows one to indicate that there is more than one type of fault that is related to that message.

The properties of the Fault Reference component are as follows:

  • {fault reference} REQUIRED. An Interface Fault component in the {faults} property of the parent Interface Operation component's parent Interface component. Identifying the Interface Fault component therefore indirectly defines the actual content or payload of the fault message.

  • {message label} REQUIRED. A wsdls:NCName as defined by [ Type]. This property identifies the message this fault relates to among those defined in the {message exchange pattern} property of the Interface Operation component it 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 fault is coming to the service or going from the service, respectively. The direction MUST be consistent with the direction implied by the fault rule used in the message exchange pattern of the operation. For example, if the fault rule fault-replaces-message is used, then a fault which refers to an outgoing message would have a {direction} property value of out. On the other hand, if the fault rule message-triggers-fault is used, then a fault which refers to an outgoing message would have a {direction} property value of in as the fault travels in the opposite direction of the message.

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

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

XML Representation of Fault Reference Component[top]

XML Representation of Fault Reference Component
<definitions>
  <interface>
    <operation>
      <infault
            ref="xs:QName"
            messageLabel="xs:NCName"? >
        <documentation />?
        [ <feature /> | <property /> ]*
      </infault>*
      <outfault
            ref="xs:QName"
            messageLabel="xs:NCName"? >
        <documentation />?
        [ <feature /> | <property /> ]*
      </outfault>*
    </operation>
  </interface>
</definitions>

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

  • A [local name] of infault or outfault

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

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

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

    • 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}, the messageLabel attribute information item is optional for the XML representation of any Fault Reference component with the same value for {direction} (if the fault pattern of the {message exchange pattern} is fault-replaces-message) or of any Fault Reference component with the opposite value for {direction} (if the fault pattern is message-triggers-fault).

    • 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:

ref attribute information item with infault, or outfault [owner][top]

ref attribute information item with infault, or outfault [owner]

The ref attribute information item refers to a fault component.

The ref attribute information item has the following Infoset properties:

  • A [local name] of ref

  • A [namespace name] which has no value

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

messageLabel attribute information item with infault, or outfault [owner][top]

messageLabel attribute information item with infault, or outfault [owner]

The messageLabel attribute information item identifies the message in the message exchange pattern of the given operation element information item to which this fault is related to.

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.

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

Mapping Fault Reference's XML Representation to Component Properties

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

1tab_FaultReference_Mapping Mapping between Fault Reference Component Properties and XML Representation Property Mapping
11{fault reference} 11The actual value of the ref attribute information item
11{message label} 11The actual value of the messageLabel attribute information item if any; otherwise the {message label} property of the message with the same {direction} from the {message exchange pattern} of the Interface Operation component, provided there is exactly one such message and the fault pattern of the {message exchange pattern} is fault-replaces-message; otherwise the {message reference} property of the message with the opposite {direction}, provided there is exactly one such message and the fault pattern is message-triggers-fault; otherwise it is an error.
11{direction} 11If the [local name] of the element information item is infault then in, else if the [local name] of the element information item is outfault then out.
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.