Skip to main content

Message mode of JAX-WS Dispatch

In message mode , a Dispatch object works with complete messages. A complete message includes any binding specific headers and wrappers. For example, a consumer interacting with a service that requires SOAP messages would need to provide the Dispatch object's invoke() method a fully specified SOAP message. The invoke() method will also return a fully specified SOAP message. The consumer code is responsible for completing and reading the SOAP message's headers and the SOAP message's envelope information.

Information noteNote: Message mode is not ideal when you wish to work with JAXB objects.

You specify that a Dispatch object uses message mode by providing the value java.xml.ws.Service.Mode.MESSAGE when creating the Dispatch object.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!