Re: Capturing SOAP file

From: Arun Gupta <>
Date: Mon, 09 Sep 2002 12:04:23 -0700

Hi Sudeep,

_setTransportFactory method is not available in javax.xml.rpc.Stub
interface. This method is available in com.sun.xml.rpc.client.StubBase
which is the base class for all the generated stubs. Please note that
all com.sun.xml.rpc.* APIs are non-standard and may be changed in the
future versions of JAX-RPC.

To log SOAP messages on server-side, you can write a server-side logging
handler which can capture the SOAP request and response messages and
dump them to a log file.

Thanks for your interest in JAX-RPC.


sudeep pattnaik wrote:

>I would like to capture the SOAP files either at Client end or at Server end. As per Arun Gupta's suggestion, I tried to do the following way at the client end. I am getting some error message as to method not found when i call _setTransportFactory method. Could somebody let me know what i am doing wrong ? Also is there any way i can log the incoming and outgoing SOAP requests from the jaxrpc Server.
>package MDSOAPService;
>import javax.xml.rpc.Stub;
>import com.sun.xml.rpc.client.http.*;
>public class MDSOAPClient {
> public static void main(String[] args) {
> String sessionID="";
> try {
> Stub stub = createProxy();
> stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY, args[0]);
> MDSOAP mds = (MDSOAP)stub;
> sessionID = mds.login("good", "xxxxx");
> FileOutputStream log = new FileOutputStream("<directory>/SOAPLOG");
> mds._setTransportFactory(new com.sun.xml.rpc.client.http.HttpClientTransportFactory(log));
> mds.logout(sessionID);
> } catch (Exception ex) {
> ex.printStackTrace();
> }
> }
> private static Stub createProxy() {
> return (Stub)(new MDSOAPServer_Impl().getMDSOAPPort());
> }
>Thanks for your help.
>Sudeep Pattnaik

There is only one me, I must live myself!
There is only one today, I must live itself!