Wednesday, March 23, 2011

JAX-WS with JBoss 6 Day 4 : Dispatch API

The Java API for XML-Based Web Services (JAX-WS) Web service client programming model supports both the Dispatch client API and the Dynamic Proxy client API.

The Dispatch client API is a dynamic client programming model, whereas the static client programming model for JAX-WS is the Dynamic Proxy client. The Dispatch and Dynamic Proxy clients enable both synchronous and asynchronous invocation of JAX-WS Web services.

Q: When to use Dispatch API?
A: When you want to work at the XML message level

The Dispatch client can send data in either MESSAGE or PAYLOAD mode.

When using the mode, the Dispatch client is responsible for providing the entire SOAP envelope including the soap:Envelope, soap:Header, and soap:Body elements.

When using the mode, the Dispatch client is only responsible for providing the contents of the soap:Body and JAX-WS includes the payload in a soap:Envelope element.

1. We are going to use web service which is built by Day 3 whose SOAP binding is wrapped doc/literal.

2. Write an outbound message in xml

3.Write a test case

No comments: