Web Services Addressing overview
Web Services Addressing (WS-Addressing) is a Worldwide 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
- message addressing properties
This topic contains an overview of each concept; for further details, refer to the WS-Addressing specifications.
Endpoint references
Endpoint references provide a standard mechanism to encapsulate information about specific endpoints and 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 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 that are 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 namespace.
http://example.com/fabrikam<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" 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> <wsaw:InterfaceName> fabrikam:Inventory </wsaw: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 that are defined by the WS-Addressing specification are summarized in the following table.
Abstract WS-Addressing MAP name 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 that is 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>
Sub-topics
Web Services Addressing message exchange patterns
Related concepts
Web Services Resource Framework support
Web Services Addressing support
Related tasks
Creating stateful Web services using the Web Services Resource Framework
Related Reference
Web Services Addressing APIs
Web Services Addressing SPI
Example: Creating a Web service that uses the Web Services Addressing API to access a generic Web service resource instance
Related information
W3C WS-Addressing specifications
W3C submission WS-Addressing specification