The new Dispatch API introduced in JAX-WS supports a fully dynamic service invocation. No WSDL or XML Schema document or any other knowledge of the message layout is required to build a client. This flexibility comes at a cost – the developer must be intimately familiar with the details of
SOAP protocol and the underlying message composition API, such as DOM or SAAJ. Some examples of situations in which you might want to use dispatches are:
* Document
exchange scenarios, where the dynamic nature of dispatches is important. For example, when the actual message is output by an external process, such as a file from an external system or as the result of an XSLT transformation. In this scenario, the dispatch is used to provide the SOAP envelope, and to transmit the message and pass back the response without interacting with the actual message.
* Where interoperability with older, non WS-I compliant services is desired, such as interoperability with RPC-encoded style services.
* Where you need to work with a data binding technology other than JAXB. JAX-WS is built around its tight integration with JAXB 2.0. Although there is no direct support for other bindings in JAX-WS, while writing this article we came across a number of scenarios where it was desirable to use another data binding technology like Castor or XML beans.
* Where there are specific advantages to be gained by not using SOAP protocol, dispatches support an XML/HTTP binding, which can be used to invoke endpoints that exchange raw XML documents based on application-defined structures.
source:
http://www.ibm.com/developerworks/websphere/library/techarticles/0707_thaker/0707_thaker.html
Gigio Avila
ITC - IS
-----------------------------------------------------------------
CCNA, SCJA, SCJP, SCMAD, SCWCD, SCEA- I