• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Printing SOAP message.

 
Jobin Mathew
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Something like this should do the trick (assuming that "reply" is a SOAPMessage object):
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I was too slow...
 
Jobin Mathew
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But I didnt find SOAPMessage object in any of the client stub classes.
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That being the case, why did you mention the getSOAPBody method? Are there other classes besides SOAPMessage that have it?
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic