+

Search Tips   |   Advanced Search

Web Services Addressing application programming model

The Web Services Addressing (WS-Addressing) specification defines an endpoint reference that is represented in Extensible Markup Language (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 by 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 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 APIs provide the appropriate interfaces for implementing the previous pattern.


Related concepts

  • Web Services Addressing support


    Related tasks

  • Create stateful web services using the Web Services Resource Framework
  • Develop applications that use Web Services Addressing