users@jax-rpc.java.net

Re: Capturing SOAP file

From: Alexi Polenur <apolenur_at_YAHOO.COM>
Date: Mon, 09 Sep 2002 12:04:37 -0700

Hi,

Apache Axis comes with the tool which can be set up
to listen to a local port and capture all the traffic
while proxing it to a target machine and port.

I found it very useful for debuging SOAP comunication.

Alexi
--- sudeep pattnaik <sudeep.pattnaik_at_SUN.COM> wrote:
> Hi,
>
> 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 java.io.*;
> 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


__________________________________________________
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
http://finance.yahoo.com