axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Fell" <sf...@salesforce.com>
Subject RE: capturing SOAP XML in a client for debug?
Date Tue, 12 Oct 2004 22:54:19 GMT
Thanks, now if only createCall wasn't private so I could do this in a
subclass instead of having to alter generated code.

Cheers
Simon

> -----Original Message-----
> From: Peter Smith [mailto:peters@fast.fujitsu.com.au] 
> Sent: Monday, October 11, 2004 7:40 PM
> To: axis-user@ws.apache.org
> Subject: Re: capturing SOAP XML in a client for debug?
> 
> I could achieve the same thing programatically by simply 
> modifying the generated Stub as follows:
> 
> BEFORE
> 
>     public int times(int in0, int in1) throws 
> java.rmi.RemoteException {
>         if (super.cachedEndpoint == null) {
>             throw new org.apache.axis.NoEndPointException();
>         }
>         org.apache.axis.client.Call _call = createCall();
>         _call.setOperation(_operations[0]);
>         _call.setUseSOAPAction(true);
>         ... blah blah blah
> 
> AFTER
> 
>     public int times(int in0, int in1) throws 
> java.rmi.RemoteException {
>         if (super.cachedEndpoint == null) {
>             throw new org.apache.axis.NoEndPointException();
>         }
>         org.apache.axis.client.Call _call = createCall();
>         //PS - start
>         org.apache.axis.Handler reqHandler = new 
> org.apache.axis.handlers.LogHandler();
>         org.apache.axis.Handler respHandler = new 
> org.apache.axis.handlers.LogHandler();
>         _call.setClientHandlers(reqHandler, respHandler);
>         //PS - end
>         _call.setOperation(_operations[0]);
>         _call.setUseSOAPAction(true);
>         ...blah blah blah
> 
> ~~~
> 
> I am a newbie to axis & web services so I hope somebody else 
> can comment if modifying stubs in this way is acceptable 
> practice or a total hack ;-)
> 
> Cheers,
> Peter.
> 
> ----- Original Message -----
> From: "Simon Fell" <sfell@salesforce.com>
> To: <axis-user@ws.apache.org>
> Sent: Tuesday, October 12, 2004 6:24 AM
> Subject: RE: capturing SOAP XML in a client for debug?
> 
> 
> > Does anyone know if there a way to do this programmatically at the
> > client ?
> >
> > Thanks
> > Simon
> >
> > > -----Original Message-----
> > > From: Nelson Minar [mailto:nelson@monkey.org]
> > > Sent: Friday, October 08, 2004 11:18 AM
> > > To: axis-user@ws.apache.org
> > > Subject: Re: capturing SOAP XML in a client for debug?
> > >
> > > >Thanks for all the suggestions - I particularly like the
> > > idea of giving
> > > >them a client WSDD that includes the log handler.
> > >
> > > This was easier than I thought. But iff there are any docs on
> > > how this works, I couldn't find them. One caveat - if you
> > > provide your own client config then you lose the default HTTP
> > > and local transports, so you have to configure them here. I
> > > left out the local transport in this example.
> > >
> > >
> > > <?xml version="1.0" encoding="UTF-8"?>
> > >
> > > <!-- Save this file as "client-config.wsdd" in the 
> working directory
> > >      of your Axis client. Axis will load it automatically. The
> > >      configuration here tells Axis to save all incoming 
> and outgoing
> > >      XML into a file named "axis.log"
> > > -->
> > >
> > > <deployment
> > >     xmlns="http://xml.apache.org/axis/wsdd/"
> > >     xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
> > >
> > >   <handler name="log"
> > > type="java:org.apache.axis.handlers.LogHandler"/>
> > >
> > >   <globalConfiguration>
> > >     <requestFlow>
> > >       <handler type="log"/>
> > >     </requestFlow>
> > >     <responseFlow>
> > >       <handler type="log"/>
> > >     </responseFlow>
> > >   </globalConfiguration>
> > >
> > >   <transport
> > >       name="http"
> > >       pivot="java:org.apache.axis.transport.http.HTTPSender"/>
> > >
> > > </deployment>
> > >
> > >
> >
> 
> This is an email from Fujitsu Australia Software Technology 
> Pty Ltd, ABN 27 003 693 481. It is confidential to the 
> ordinary user of the email address to which it was addressed 
> and may contain copyright and/or legally privileged 
> information. No one else may read, print, store, copy or 
> forward all or any of it or its attachments. If you receive 
> this email in error, please return to sender. Thank you.
> 
> If you do not wish to receive commercial email messages from 
> Fujitsu Australia Software Technology Pty Ltd, please email 
> unsubscribe@fast.fujitsu.com.au
> 
> 
> 

Mime
View raw message