Web Services Addressing application programming model
The Web Services Addressing (WS-Addressing) specification defines an endpoint reference that is represented in XML by an EndpointReferenceType object that encapsulates information about the endpoint address as well as additional contextual information associated with the endpoint. Some services might be addressable using a simple URI address, as is most typical in Web services. Other services might require the use of an endpoint reference to address them, so that the additional contextual information associated with the endpoint is present in messages sent to the endpoint.
Examples of services that use WS-Addressing endpoint references include Web Services Resources and Web Services Notification message producers and message consumers, all of which have the notion of stateful resources associated with their endpoints. In these cases the endpoint reference not only contains the service address but also some data that is used to select the specific stateful resource instance for use in the processing of a Web services message. A WS-Resource is defined as the combination of a resource and a Web service through which the resource is accessed. The following figure illustrates a Web service, at http://www.example.com/service, and three resources, A, B, and C, which are accessed through the Web service. Three WS-Resources are therefore illustrated in the figure:
A WS-Resource is referenced by a WS-Addressing endpoint reference that uniquely identifies the WS-Resource, typically by containing an identifier of the resource component of the WS-Resource inside the EndpointReference ReferenceParameter element. In the previous example, WS-Resource-C is the combination of the Web service and the resource that is identified by C, and a reference to WS-Resource-C might be as follows:
<wsa:EndpointReference> <wsa:Address> http://www.example.com/service </wsa:Address> <wsa:ReferenceParameters> <tns:SomeDisambiguatorElement>C</tns:SomeDisambiguatorElement> </wsa:ReferenceParameters> ... </wsa:EndpointReference>The WS-Addressing API provides the appropriate interfaces for implementing the previous pattern.
Related concepts
Web Services Addressing support
Web Services Resource Framework support
Related tasks
Creating stateful Web services using the Web Services Resource Framework
Developing Applications that use Web Services Addressing