+

Search Tips   |   Advanced Search

Web Services Addressing overview

Web Services Addressing (WS-Addressing) is a World Wide Web Consortium (W3C) specification that aids interoperability between web services by defining a standard way to address web services and provide addressing information in messages. The WS-Addressing specification introduces two primary concepts: endpoint references, and message-addressing properties. For further details, refer to the WS-Addressing specifications.


Endpoint references

Endpoint references provide a standard mechanism to encapsulate information about specific endpoints. Endpoint references can be propagated to other parties and then used to target the web service endpoint that they represent. The following table summarizes the information model for endpoint references.

Abstract property name, using the notational convention of the W3C XML Information Set Property type Multiplicity Description
[address] xs:anyURI 1..1 The absolute URI that specifies the address of the endpoint.
[reference parameters]* xs:any 0..unbounded Namespace qualified element information items required to interact with the endpoint.
[metadata] xs:any 0..unbounded Description of the behavior, policies and capabilities of the endpoint.
The following prefix and corresponding namespace is used in the previous table.

Prefix Namespace
xs http://www.w3.org/2001/XMLSchema

The following XML fragment illustrates an endpoint reference. This element references the endpoint at the URI http://example.com/fabrikam/acct, has metadata specifying the interface to which the endpoint reference refers, and has application-defined reference parameters of the http://example.com/fabrikam namespace.

<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing"
                       xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
                       xmlns:fabrikam="http://example.com/fabrikam"
                       xmlns:wsdli="http://www.w3.org/2005/08/wsdl-instance"
                       wsdli:wsdlLocation="http://example.com/fabrikam
                       http://example.com/fabrikam/fabrikam.wsdl">
  <wsa:Address>http://example.com/fabrikam/acct</wsa:Address>
  <wsa:Metadata>
    <wsam:InterfaceName>fabrikam:Inventory</wsam:InterfaceName>
  </wsa:Metadata>
  <wsa:ReferenceParameters>
    <fabrikam:CustomerKey>123456789</fabrikam:CustomerKey>
    <fabrikam:ShoppingCart>ABCDEFG</fabrikam:ShoppingCart>
  </wsa:ReferenceParameters>
</wsa:EndpointReference>


Message-addressing properties

Message addressing properties (MAPs) are a set of well defined WS-Addressing properties that can be represented as elements in SOAP headers and provide a standard way of conveying information, such as the endpoint to which message replies should be directed, or information about the relationship that the message has with other messages. The MAPs defined by the WS-Addressing specification are summarized in the following table.

Abstract WS-Addressing MAP name, using the notational convention of the W3C XML Information Set MAP content type Multiplicity Description
[action] xs:anyURI 1..1 An absolute URI that uniquely identifies the semantics of the message. This proprety corresponds to the address property of the endpoint reference to which the message is addressed. This value is required.
[destination] xs:anyURI 1..1 The absolute URI that specifies the address of the intended receiver of this message. This value is optional because, if not present, it defaults to the anonymous URI defined in the specification, indicating that the address is defined by the underpinning protocol.
[reference parameters]* xs:any 0..unbounded Correspond to the reference parameters property of the endpoint reference to which the message is addressed. This value is optional.
[source endpoint] EndpointReference 0..1 A reference to the endpoint from which the message originated. This value is optional.
[reply endpoint] EndpointReference 0..1 An endpoint reference for the intended receiver of replies to this message. This value is optional.
[fault endpoint] EndpointReference 0..1 An endpoint reference for the intended receiver of faults relating to this message. This value is optional.
[relationship]* xs:anyURI plus optional attribute of type xs:anyURI 0..unbounded A pair of values that indicate how this message relates to another message. The content of this element conveys the message ID of the related message. An optional attribute conveys the relationship type. This value is optional.
[message id] xs:anyURI
An absolute URI that uniquely identifies the message. This value is optional.
The abstract names in the previous tables are used to refer to the MAPs throughout this documentation.

The following example of a SOAP message contains WS-Addressing MAPs:

<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope"
            xmlns:wsa="http://www.w3.org/2005/08/addressing"
            xmlns:fabrikam="http://example.com/fabrikam">
  <S:Header>
    ...
    <wsa:To>http://example.com/fabrikam/acct</wsa:To>
    <wsa:ReplyTo>
      <wsa:Address> http://example.com/fabrikam/acct</wsa:address>
    </wsa:ReplyTo>
    <wsa:Action>...</wsa:Action>
    <fabrikam:CustomerKey wsa:IsReferenceParameter='true'>123456789</fabrikam:CustomerKey>
    <fabrikam:ShoppingCart wsa:IsReferenceParameter='true'>ABCDEFG</fabrikam:ShoppingCart>
    ...
  </S:Header>
  <S:Body>
    ...
  </S:Body>
</S:Envelope>


Subtopics


Related:

  • Web Services Resource Framework support
  • Web Services Addressing APIs
  • IBM proprietary Web Services Addressing SPIs
  • Create stateful web services using the Web Services Resource Framework
  • W3C WS-Addressing specifications
  • W3C submission WS-Addressing specification
  • W3C XML Information Set: http://www.w3.org/TR/xml-infoset/