Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Print Soap request/response XMLs

 
toni lee
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 393
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

You can use "writeTo" method of SOAPMessage Object.Let me know if it works or not ?...
 
toni lee
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 393
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use tcpmon utility class provided with AXIS to monitor SOAP requests & Response.
 
Markus Umefjord
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

The simple solution is:



(insert after _call.invoke(...))
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic