• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Printing SOAP message.

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Something like this should do the trick (assuming that "reply" is a SOAPMessage object):
 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was too slow...
 
Jobin Mathew
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But I didnt find SOAPMessage object in any of the client stub classes.
 
Ulf Dittmer
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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!
 
reply
    Bookmark Topic Watch Topic
  • New Topic