jQuery in Action, 2nd edition*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes Print Soap request/response XMLs Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "Print Soap request/response XMLs" Watch "Print Soap request/response XMLs" New topic
Author

Print Soap request/response XMLs

toni lee
Greenhorn

Joined: Nov 19, 2003
Posts: 4
Is there a way to print the SOAP request/response XMLs, from soap objects? Maybe, before Call.invoke method is being invoked?

Thanks in advance.
james edwin
Ranch Hand

Joined: Nov 22, 2001
Posts: 393
Hi,

You can use "writeTo" method of SOAPMessage Object.Let me know if it works or not ?...


Regards,
James
toni lee
Greenhorn

Joined: Nov 19, 2003
Posts: 4
Sorry, I should have mentioned that we're using Axis. I have a handle to the org.apache.axis.client.Call object, and I tried getting a handle on the SoapMessage object by doing _call.getMessageContext().getMessage(), but that returned null. getRequestMessage() and getResponseMessage() returned null too.

I guess the right way to handle this is to find the trigger in the server config to turn on logging of soap calls. But the reason I'm looking for an alternative fix is because no one seems to know where or what that flag is.
james edwin
Ranch Hand

Joined: Nov 22, 2001
Posts: 393
Hi Toni,

In that case you can use the " TCP/IP Monitor" of Axis to see what's data is going and coming on wire.
Amit G Piplani
Ranch Hand

Joined: Jul 21, 2004
Posts: 83
use tcpmon utility class provided with AXIS to monitor SOAP requests & Response.


SCJP,SCWCD,SCBCD,SCDJWS1.4, SCDJWS1.5
Markus Umefjord
Greenhorn

Joined: Oct 19, 2005
Posts: 1
Hi,

The simple solution is:



(insert after _call.invoke(...))
 
wood burning stoves
 
subject: Print Soap request/response XMLs
 
Similar Threads
Apache Axis logging of SOAP Request/Response
There has to be an easy way...
Axis2 and Soap Handler
Log files, A question
Command line alternative to tcpmon