Java Reference
In-Depth Information
---[HTTP request]---
SOAPAction: ""
Accept: text/xml, multipart/related, text/html,
image/gif, image/jpeg, *; q=.2, */*; q=.2
Content-Type: multipart/related; type="text/xml";
boundary="uuid:002fa642-b700-47c4-a298-ed1e1fb03795"
-- uuid:002fa642-b700-47c4-a298-ed1e1fb03795
Content-Type: text/xml
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<ns2:sayHello xmlns:ns2="http://ch03.soacookbook.com/">
<arg0 xmlns="">Eben</arg0>
</ns2:sayHello></S:Body>
</S:Envelope>
--uuid:002fa642-b700-47c4-a298-ed1e1fb03795
Content-Id:<Version-1.5-Notice>
Content-Type: text/plain
Content-Transfer-Encoding: binary
Client will support JMS in version 1.5.
--uuid:002fa642-b700-47c4-a298-ed1e1fb03795
The attachment was added to the message associated with the given UUID, and this will be
dispatched to the service.
Discussion
Message contexts are used to share state related to message processing. The
javax.xml.ws.handler.MessageContext is the super-interface for message contexts in
JAX-WS. You may recall from Intercepting the Request to Perform Protocol-Specific Work
that the handleMessage and handleFault methods of Handler accept a generic type para-
meter of <C extends MessageContext> . LogicalMessageContext and SOAPMessageCon-
text both extend MessageContext to provide properties useful for their respective handler
types, therefore fulfilling the generic type parameter contract. We'll look at the capabilities of
these subinterfaces in a moment. But MessageContext provides a number of keys out of the
box that can give you useful information about the current message being processed by the
handler.
MessageContext properties
Many properties are available in the MessageContext interface, including:
Search WWH ::




Custom Search