aspose file tools*
The moose likes Web Services and the fly likes Printing SOAP message. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Printing SOAP message." Watch "Printing SOAP message." New topic
Author

Printing SOAP message.

Jobin Mathew
Ranch Hand

Joined: Oct 17, 2006
Posts: 83
Hi,
I created a client using wsimport tool. Can I display the entire SOAP message by using some functions like getSOAPBody() on some object available in Client stubs? (Without configuring a handler)
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41527
    
  53
Something like this should do the trick (assuming that "reply" is a SOAPMessage object):


Ping & DNS - my free Android networking tools app
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
I was too slow...
Jobin Mathew
Ranch Hand

Joined: Oct 17, 2006
Posts: 83
But I didnt find SOAPMessage object in any of the client stub classes.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41527
    
  53
That being the case, why did you mention the getSOAPBody method? Are there other classes besides SOAPMessage that have it?
Ivan Krizsan
Ranch Hand

Joined: Oct 04, 2006
Posts: 2198
    
    1
Hi!
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.
Best wishes!
 
jQuery in Action, 2nd edition
 
subject: Printing SOAP message.