This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Web Services and the fly likes Print out the SOAP request Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Web Services
Reply Bookmark "Print out the SOAP request" Watch "Print out the SOAP request" New topic
Author

Print out the SOAP request

Jeppe Sommer
Ranch Hand

Joined: Jan 07, 2004
Posts: 263
How can I print out the SOAP request to see how the SOAP Envelope looks like?


[ June 06, 2006: Message edited by: Jeppe Fjord ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35237
    
    7
It would be much less messy to use a tool like TCPMon to visualize the SOAP request and response. That's also part of the Axis download, and the documentation is here.


Android appsImageJ pluginsJava web charts
Jeppe Sommer
Ranch Hand

Joined: Jan 07, 2004
Posts: 263
Is that the only way to use a tool like "tcpmon" to see how the envelop looks like? I hope there was a certain method to print out what is sent to the webservice...
Masoud Kalali
Author
Ranch Hand

Joined: Jul 08, 2004
Posts: 531

you may use a message handler to print out the soap messages.
by using handlers you can intercept a message before going out or comming in.
for more information look at :
http://www-128.ibm.com/developerworks/webservices/library/ws-tipjax1.html


Masoud Kalali
Software Engineer - My Weblog - GlassFish Security
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35237
    
    7
Here's a code snippet I used to print out a SOAP message.


[ June 07, 2006: Message edited by: Ulf Dittmer ]
Paul Celona
Greenhorn

Joined: May 20, 2004
Posts: 15
When implementing this code snippet in a web service msg handler, where does the println go to?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35237
    
    7
@Paul:

It uses standard out, so whereever that goes, the output will go. On the server it usually ends up in one of the log files, but that depends on which server is used.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Print out the SOAP request
 
Similar Threads
webservices api
Apache SOAP newbie
execution error in SOAP client-server
problem with SOAP
SOAP Header Authentication!!!