Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SOAP request from Client

 
Kiran Kumar
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All,
Can anyone please tell me if there is a way to capture the SOAP request that the client sends to the server?
I don't find any help with the class "Call" when I looked at the SOAP API at Apache.
Thanks,
Kiran
Kansas State University
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Apache Axis comes with a SOAP monitoring tool, which logs all coming/going SOAP messages into a GUI.
Check out Axis documentation for details. (I haven't used the tool myself)
 
Kiran Kumar
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Lasse,
Thanks for the reply. I have already few tools which are gonna capture the Client's request in a GUI. But I want to capture the Client's request in a string using basic Java or using SOAP libraries. So, a more clear question is, does SOAP provide any class for capturing the Client's request.
Thanks,
Kiran
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So you want to get the whole SOAP request, that is the SOAP envelope and headers, right?
The only way I know of is to hack into the SOAP receiver (e.g. Apache Axis) source code. But I would also appreciate if someone knows another solution.
 
Kiran Kumar
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lasse,
The current Apache SOAP code has this capability. You explicitly
create an instance of SOAPHTTPConnection and call the setRequestCopy
method to register a StringBuffer that will receive a copy of the
request. You call the setSOAPTransport method on your Call instance
to tell it to use the connection you have created. After calling
invoke, a copy of the request will be in your StringBuffer.
You can get a nightly build at
http://cvs.apache.org/dist/soap/nightly/.
But, please look at the latest posting by me regarding its working.
Thanks,
Kiran
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ah. Thanks for the tip.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13064
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For my SOAP book I wrote a utility to do capture, saving and resending of the full content. Seemy page for the SOAP book. At the bottom of the page is a download for UtilSnoop with source code.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic