Stylus Studio XML Editor

Table of contents

Appendices

2.4 Interface Operation

Interface Operation

The Interface Operation Component[top]

The Interface Operation Component

An Interface Operation component describes an operation that a given interface supports. An operation is an interaction with the service consisting of a set (ordinary and fault) messages exchanged between the service and the other roles involved in the interaction, in particular the service requester. The sequencing and cardinality of the messages involved in a particular interaction is governed by the message exchange pattern used by the operation (see {message exchange pattern} property).

A message exchange pattern defines placeholders for messages, the participants in the pattern (i.e., the sources and sinks of the messages), and the cardinality and sequencing of messages exchanged by the participants. The message placeholders are associated with specific message types by the operation that uses the pattern by means of message and fault references (see {message references} and {fault references} properties). The service whose operation is using the pattern becomes one of the participants of the pattern. This specification does not define a machine understandable language for defining message exchange patterns, nor does it define any specific patterns. The companion specification, [WSDL-PART2] defines a set of such patterns and defines identifying URIs any of which MAY be used as the value of the {message exchange pattern} property.

The properties of the Interface Operation component are as follows:

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

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

  • {message exchange pattern} REQUIRED. A wsdls:anyURI identifying the message exchange pattern used by the operation. This URI MUST be an absolute URI (see [RFC2396]).

  • {message references} OPTIONAL. A set of Message Reference components for the ordinary messages the operation accepts or sends. (See [Message Reference].)

  • {fault references} OPTIONAL. A set of Fault Reference components for the fault messages the operation accepts or sends. (See [Fault Reference].)

  • {style} OPTIONAL. A set of wsdls:anyURIs identifying the rules that were used to construct the {element} properties of {message references}. (See [Operation Style].) These URIs MUST be absolute URIs (see [RFC2396]).

  • {safety} REQUIRED. A wsdls:boolean (see [ Type]) indicating whether the operation is asserted to be safe (as defined in Section 3.5 of [webarch]) for users of the described service to invoke. If this property is false, then no assertion has been made about the safety of the operation, thus the operation MAY or MAY NOT be safe. However, an operation SHOULD be marked safe if it meets the criteria for a safe interaction defined in Section 3.5 of [webarch].

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

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

For each Interface Operation component in the {operations} property of an Interface component, the combination of {name} and {target namespace} properties MUST be unique.

Interface Operation components are local to Interface components; they cannot be referred to by QName, despite having both {name} and {target namespace} properties. That is, two Interface components sharing the same {target namespace} property but with different {name} properties MAY contain Interface Operation components which share the same {name} property. Thus, the {name} and {target namespace} properties of the Interface Operation components are not sufficient to uniquely identify an Interface Operation component. In order to uniquely identify an Interface Operation component, one must first identify the Interface component (by QName) and then identify the Interface Operation within that Interface component (by a further QName).

In cases where, due to an interface extending one or more other interfaces, two or more Interface Operation components have the same value for their {name} and {target namespace} properties, then the component models of those Interface Operation components MUST be equivalent (see [Equivalence of Components]). If the Interface Operation components are equivalent then they are considered to collapse into a single component. It is an error if two Interface Operation components have the same value for their {name} and {target namespace} properties but are not equivalent.

Note that, due to the above rules, if two interfaces that have the same value for their {target namespace} property also have one or more operations that have the same value for their {name} property then those two interfaces cannot both form part of the derivation chain of a derived interface unless those operations are the same operation.

NOTE: 

For the above reason, it is considered good practice to ensure, where necessary, that the {name} property of Interface Operation components within a namespace are unique, thus allowing such derivation to occur without inadvertent error.

Operation Style[top]

Operation Style

If the {style} property of an Interface Operation component has a value then that value (a set of URIs) implies the rules that were used to define the {element} properties (or other property which defines the content of the message properties; see [Using Other Schema Languages]) of all the Message Reference components which are members of the {message references} property of that component.

Note that the property MAY not have any value. If this property has a value (a set of URIs), then for each individual URI that is an element of that set, the rules implied by that URI (such as rules that govern the schemas) MUST be followed or it is an error. So, if the set of URIs has more than one item in it, then the rules implied by ALL the URIs must be adhered to by the content definitions.

This specification defines the following pre-defined operation style:

RPC Style[top]

RPC Style

The RPC style is selected by assigning to an Interface Operation component's {style} property the value http://www.w3.org/2004/08/wsdl/style/rpc.

The RPC style MUST NOT be used for Interface Operation components whose {message exchange pattern} property has a value other than 'http://www.w3.org/2004/08/wsdl/in-only' or 'http://www.w3.org/2004/08/wsdl/in-out'.

When this value is used, the associated messages MUST conform to the rules below, described using XML Schema [XMLSchemaP1]. Note that operations containing messages described by other type systems may also indicate use of the RPC style, as long as they are constructed in such a way as to follow these rules.

If the Interface Operation component uses a {message exchange pattern} for which there is no output element, such as 'http://www.w3.org/2004/08/wsdl/in-only', then the conditions stated below that refer to output elements MUST be considered to be implicitely satisfied.

  • The content model of input and output {element} elements MUST be defined using a complex type that contains a sequence from XML Schema.

  • The sequence MUST only contain elements. It MUST NOT contain other structures such as xs:choice.

  • The sequence MUST contain only local element children. Note that these child elements MAY contain the following attributes: nillable, minOccurs and maxOccurs.

  • The LocalPart of input element's QName MUST be the same as the Interface operation component's name.

  • The LocalPart of the output element's QName is obtained by concatenating the name of the operation and the string value "Response".

  • Input and output elements MUST both be in the same namespace.

  • The complex type that defines the body of an input or an output element MUST NOT contain any attributes.

  • If elements with the same qualified name appear as children of both the input and output elements, then they MUST both be declared using the same type.

  • The input or output sequence MUST NOT contain multiple children elements declared with the same name.

wrpc:signature Extension[top]

wrpc:signature Extension

The wrpc:signature extension AII MAY be be used in conjunction with the RPC style to describe the exact signature of the function represented by an operation that uses the RPC style.

When present, the wrpc:signature extension contributes the following property to the interface operation component it is applied to:

  • {rpc-signature} REQUIRED. A list of pairs (q, t) whose first component is of type wsdls:QName (as defined by [ Type]) and whose second component is of type wsdls:Token (as defined by [ Type]). Values for the second component MUST be chosen among the following four: "#in", "#out", "#inout" "#return".

The value of the {rpc-signature} property MUST satisfy the following conditions:

  • The value of the first component of each pair (q, t) MUST be unique within the list.

  • For each child element of the input and output messages of the operation, a pair (q, t) whose first component q is equal to the qualified name of that element MUST be present in the list, with the caveat that elements that appear with cardinality greater than one MUST be treated as as a single element.

  • For each pair (q, #in), there MUST be a child element of the input element with a name of q and there MUST NOT be a child element of the output element with the same name.

  • For each pair (q, #out), there MUST be a child element of the output element with a name of q and there MUST NOT be a child element of the input element with the same name.

  • For each pair (q, #inout), there MUST be a child element of the input element with a name of q and there MUST be a child element of the output element with the same name. Furthermore, those two elements MUST have the same type.

  • For each pair (q, #return), there MUST be a child element of the output element with a name of q and there MUST NOT be a child element of the input element with the same name.

The function signature defined by a wrpc:signature extension is determined as follows:

  1. Start with the value of the {rpc-signature} property, a (possibly empty) list of pairs of this form:

        [(q0, t0), (q1, t1), ...]

  2. Filter the elements of this list into two lists, the first one (L1) comprising pairs whose t component is one of {#in, #out, #inout}, the second (L2) pairs whose t component is #return.

    For ease of visualization, let's denote the two lists as

        (L1)    [(a0, u0), (a1, u1),...]

    and

        (L2)    [(r0, #return), (r1, #return),...]

    respectively.

  3. Then the formal signature of the function is

        f([d0] a0, [d1] a1, ...) => (r0, r1, ...)

    i.e.

    • the list of formal arguments to the function is [a0, a1, ...];

    • the direction of each formal argument a is one of [in], [out], [inout], determined according to the value of its corresponding u token;

    • the list of formal return parameters of the function is [r0, r1, ...];

    • each formal argument and formal return parameter is typed according to the type of the child element identified by it (unique per the conditions given above).

XML Representation of the wrpc:signature Extension[top]

XML Representation of the wrpc:signature Extension

The XML representation for the RPC signature extension is an attribute information item with the following Infoset properties:

  • A [local name] of signature

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

The type of the name attribute information item is a list type whose item type is the union of the xs:QName type and the subtype of the xs:Token type restricted to the following four values: "#in", "#out", "#inout", "#return". See [Definition of the wrpc:signature extension] for a definition of this type.

Additionally, each even-numbered item (0, 2, 4, ...) in the list MUST be of type xs:QName and each odd-numbered item (1, 3, 5, ...) in the list MUST be of the subtype of xs:Token described in the previous paragraph.

Definition of the wrpc:signature extension

<xs:attribute name="signature" type="wrpc:signatureType"/>

<xs:simpleType name="signatureType">
  <xs:list itemType="wrpc:signatureItemType"/>
</xs:simpleType>

<xs:simpleType name="signatureItemType">
  <xs:union memberTypes="wrpc:directionToken xsd:QName"/>
</xs:simpleType>

<xs:simpleType name="directionToken">
  <xs:restriction base="xs:token">
    <xs:enumeration value="#in"/>
    <xs:enumeration value="#out"/>
    <xs:enumeration value="#inout"/>
    <xs:enumeration value="#return"/>
  </xs:restriction>
</xs:simpleType>
	  
	   

wrpc:signature Extension Mapping To Properties of an Interface Operation Component[top]

wrpc:signature Extension Mapping To Properties of an Interface Operation Component

A wrpc:signature extension attribute information item is mapped to the following property of the Interface Operation component (see [The Interface Operation Component]) defined by its [owner].

1tab_InterfaceOperation_RPC_Signature_Mapping Mapping of a wrpc:signature Extension to Interface Operation Component Properties Property Mapping
11{rpc-signature} 11 A list of (xs:QName, xs:Token) pairs formed by grouping the items present in the actual value of the wrpc:signature attribute information item in the order in which they appear there.

XML Representation of Interface Operation Component[top]

XML Representation of Interface Operation Component
<definitions>
  <interface>
    <operation
          name="xs:NCName" 
          pattern="xs:anyURI"
          style="list of xs:anyURI"? 
          safe="xs:boolean"? >
      <documentation />?
      [ <feature /> | <property /> | 
        [ <input /> | <output /> | <infault /> | <outfault /> ]+
      ]*
    </operation>
  </interface>
</definitions>

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

  • A [local name] of operation

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

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

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

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

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

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

  • At least one of the [children] MUST be an input, output, infault, or outfault element information item.

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

name attribute information item with operation [owner]

The name attribute information item identifies a given operation element information item inside a given interface element information item.

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.

pattern attribute information item with operation [owner][top]

pattern attribute information item with operation [owner]

The pattern attribute information item identifies the message exchange pattern a given operation uses.

The pattern attribute information item has the following Infoset properties:

  • A [local name] of pattern

  • A [namespace name] which has no value

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

style attribute information item with operation [owner][top]

style attribute information item with operation [owner]

The style attribute information item indicates the rules that were used to construct the {element} properties of the Message Reference components which are members of the {message references} property of the [owner] operation.

The style attribute information item has the following Infoset properties:

  • A [local name] of style

  • A [namespace name] which has no value

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

safe attribute information item with operation [owner][top]

safe attribute information item with operation [owner]

The safe attribute information item indicates whether the operation is safe or not.

The safe attribute information item has the following Infoset properties:

  • A [local name] of safe

  • A [namespace name] which has no value

The type of the safe attribute information item is xs:boolean and does not have a default value.

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

Mapping Interface Operation's XML Representation to Component Properties

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

1tab_InterfaceOperation_Mapping Mapping between Interface Operation 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 of the [parent] interface element information item.
11{message exchange pattern} 11The actual value of the pattern attribute information item
11{message references} 11 The set of message references corresponding to the input and output element information items in [children], if any.
11{fault references} 11 The set of fault references corresponding to the infault and outfault element information items in [children], if any.
11{style} 11 The set containing the URIs in the actual value of the style attribute information item if present, otherwise the set containing the URIs in the actual value of the styleDefault attribute information item of the [parent] interface element information item if present, otherwise empty.
11{safety} 11 The actual value of the safe attribute information item if present, otherwise the value false.
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.