Skip navigation

XML-based webservices make use of XML messages for communication. While working with JAX-WS , programmers work with SEI (Service Endpoint Interface) which simplify and hide the details of converting between Java method invocations and their associated XML messages.But if you want to work directly with XML messages you can consider using Dispatch interface. Dispatch client API ( is a low level API that requires clients to construct messages or message payloads as XML.
Using Dispatch, the client can send data in either MESSAGE or PAYLOAD mode.

MESSAGE Mode : Using the MESSAGE mode (, the Dispatch client works directly with the message . The entire SOAP envelope (<soap:Envelope>,<soap:Header>, and <soap:Body>) is provided by the client.

PAYLOAD Mode : Using the PAYLOAD ( ) mode, the Dispatch client wokrs with the payload of the message . The client is responsible for providing the contents of the . The element is provided by JAX-WS.

The Dispatch client implementations should support following types of objects:

Type of Object


Bindings Supported


Clients can use XML generating and consuming API’s directly


JAXB Objects

Clients use JAXB generated objects



Clients work with SOAP messsages

SOAP binding in Message mode


Clients work with MIME-types messages

HTTP binding in Message mode


One Comment

  1. I find this code very useful. I assume that the purpose of posting a reply to the client is to confirm to the client that the message has indeed been processed?
    Do you mind giving me the sample EAR file that you have tested already? I have JBoss 5 running on my system. I would like to try it on that.
    Thanks very much.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: