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
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
Joined: Jan 23, 2002
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.
Joined: Jan 06, 2003
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