Java Reference
In-Depth Information
Abstracting Addressing
Problem
You are developing a service starting from Java, and want to abstract the addressing mechan-
ism for message exchanges in your services away from the transport specified in your binding
to make your services more interoperable.
Solution
Use an implementation of the WS-Addressing specification, such as is included with JAX-WS
2.1.
Discussion
The WS-Addressing specification exists to provide a way to address web services and mes-
sages without directly referencing their transport mechanism. It allows your web service to
use HTTP, SMTP, JMS, XMPP, or any other protocol as a transport layer, and to address
your messages independently without identifying protocol-specific characteristics. What this
means in practice is that a service can be consumed by a client with the same semantics, even
across protocols.
This is particularly useful in sending messages through networks that include processing
nodes such as firewalls and gateways. As a result, WS-Addressing offers another method of
achieving greater interoperability.
Toward this aim, WS-Addressing indicates two constructs: a service endpoint and message
information headers. The endpoint is the target for messages, the service to which they are
addressed. Message information headers include addressing information for message sources
and endpoints, as well as message identity.
NOTE
You can use Addressing with Apache Axis2 1.1.0, CXF, Glassfish/Metro v2, WebLogic 10gR3, and
others. It is also implemented in .NET 3.0 and 3.5. Members of the Microsoft and Sun web services
teams regularly get together for what are called “plugfests.” These events invite developers of various
spec implementations to bring their laptops and run a defined test suite against other implementations
to ensure that they actually work together. The results of these plugfests are typically posted online,
sometimes in developer blogs.
Search WWH ::




Custom Search