This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
But I didnt find SOAPMessage object in any of the client stub classes.
Joined: Mar 22, 2005
That being the case, why did you mention the getSOAPBody method? Are there other classes besides SOAPMessage that have it?
Joined: Oct 04, 2006
As far as I understand, you want to print SOAP messages issued by a web service client.
I suspect that the most compatible way is to use a logging handler. In my SCDJWS study notes, section 9.5, there is a complete example on how such a handler can be implemented.
You could investigate the JAX-WS SPI, described in section 4.6 of my study notes, in order to customize the JAX-WS implementation (assuming that you do use a JAX-WS implementation). However, this seems slightly awkward, compared to using a logging handler.