The handleRequest, handleResponse and handleFault methods for a SOAP message handler get access to the SOAPMessage from the SOAPMessageContext. The implementation of these methods can modify the SOAPMessage including the headers and body elements.
My Linked In
posted 15 years ago
Thanks for your reply, Valentin !
In the mean time, I cross-checked with the book "J2EE Web Services" by Richar Monson-Haefel. It says
Neither SOAP 1.1 nor the BP explicity prohibits intermediaries from modifying the contents of the Body element. As a result, the ultimate reciever has no way of knowing if the application specific data has changed somewhere along the message path. SOAP 1.2 reduces this uncertainty by explictly prohibiting certain intermediaries, called forwarding intermediaries, from changing the contents of the Body element and recommeding that all other intermediaries, called active intermiediaries, use a header block to document any chances to the Body element.
So, looks like JAX-RPC message handlers fall under "active intermediaries". Any idea if JAX-RPC Message handlers can be mde "forwarding intermediaries" ?
In reality, it is not uncommon to find message handlers manipulating the body. Repsponse caching is one example where a handler caches outgoing responses( in handleResponse ) and uses the cached responses to intelligently parse the incoming message( in handleRequest ). If match found, the handleRequest can either tag the SOAP body with response as the hint to the ultimate receiver, or even better, simply send the response back to the client skipping actual end point invocation.
Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
As you say "If match found, the handleRequest can either tag the SOAP body with response as the hint to the ultimate receiver, or even better, simply send the response back to the client skipping actual end point invocation."
can you please explain this sentence clearly ...
A day job? In an office? My worst nightmare! Comfort me tiny ad!
Devious Experiments for a Truly Passive Greenhouse!