You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jin-Ha Tchoe <Ji...@evision.de> on 2005/04/08 12:25:05 UTC

How to dump the raw SOAP Envelope?

Hi,

we use Axis 1.2 Alpha with Tomcat 4.0.3 and Castor 0.95 for a
SOAP-Service. Sometimes we have customers you are not accustomed to SOAP
and have lots of problems using our Service. The problems range from
simple typos and wrong namespaces to forgetting the SOAP-Envelope.

 Whenever Axis and Castor are unable to determine the right Service or
(Un-)marshal the message, the most the customers can see (and therefore
us) is a simple AxisFault. Unfortunately that does not help us see what
exactly is going wrong. So, is there a way for Axis to dump the complete
raw SOAP Envelope _before_ doing its work, so that we can something?

Many thanks in advance,

Jin-Ha Tchoe
-- 
Jin-Ha Tchoe <Ji...@evision.de>


Re: How to dump the raw SOAP Envelope?

Posted by av...@allesta.com.
Hi Jin-Ha,

Have you taken a look at wsabi4axis, an open source Web Services Management
Platform (http://sourceforge.net/projects/wsabi4axis)?  *One* of the features
of wsabi4axis is the ability to persist each and every request/response for
your service into a database and then view the raw envelopes via the wsabi4axis
web application.  You can also view the transport (most likely http) headers
assoicated with the request.

For a demo:

1. Goto http://demo.wsabi.org
2. Click on "Monitor"
3. Click on "Audit Logs"
4. Choose "YahooUserPingService" and a time range
5. You will see a table with client request summaries
6. Click on the timestamp for detailed view of the request/response

Al

Quoting Jin-Ha Tchoe <Ji...@evision.de>:

> Hi,
>
> we use Axis 1.2 Alpha with Tomcat 4.0.3 and Castor 0.95 for a
> SOAP-Service. Sometimes we have customers you are not accustomed to SOAP
> and have lots of problems using our Service. The problems range from
> simple typos and wrong namespaces to forgetting the SOAP-Envelope.
>
>  Whenever Axis and Castor are unable to determine the right Service or
> (Un-)marshal the message, the most the customers can see (and therefore
> us) is a simple AxisFault. Unfortunately that does not help us see what
> exactly is going wrong. So, is there a way for Axis to dump the complete
> raw SOAP Envelope _before_ doing its work, so that we can something?
>
> Many thanks in advance,
>
> Jin-Ha Tchoe
> --
> Jin-Ha Tchoe <Ji...@evision.de>
>
>



Re: How to dump the raw SOAP Envelope?

Posted by Jin-Ha Tchoe <Ji...@evision.de>.
Hi all,

thanks so far. 
Would the LogHandler that is supplied with Axis be sufficient for my
needs? If yes, how do I configure that damn thing? I tried the following
in the server-config.wsdd
- Under the deployment-Tag I inserted :
	 <handler name="LogHandler"
type="java:org.apache.axis.handlers.LogHandler">
            <parameter name="writeToConsole" value="false"/>
            <parameter name="fileName" value="/tmp/Axis_Raw.log"/>
         </handler>
- then I uncommented the LogHandler-handlertag in the http-Transport so
that is looks like this:
    <transport name="http">
     <requestFlow>
       <handler type="LogHandler"/>
       <handler type="URLMapper"/> 
       <handler
type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
     </requestFlow>
     </transport>

I must be doing something wrong here, but I didn't find any examples on
how to configure the LogHandler.

Regards,

Jin-Ha Tchoe


Am Freitag, den 08.04.2005, 16:05 +0530 schrieb Venkat Reddy:
> You can write a tiny logging handler to do something like - 
> 
> Transformer transformer = TransformerFactory.newInstance().newTransformer();
> StringWriter stringWriter = new StringWriter(128);
> transformer.transform(new DOMSource(env), new StreamResult(stringWriter));
> StringBuffer buffer =  stringWriter.getBuffer();
> 
> - venkat
> 
> On Apr 8, 2005 3:55 PM, Jin-Ha Tchoe <Ji...@evision.de> wrote:
> > Hi,
> > 
> > we use Axis 1.2 Alpha with Tomcat 4.0.3 and Castor 0.95 for a
> > SOAP-Service. Sometimes we have customers you are not accustomed to SOAP
> > and have lots of problems using our Service. The problems range from
> > simple typos and wrong namespaces to forgetting the SOAP-Envelope.
> > 
> > Whenever Axis and Castor are unable to determine the right Service or
> > (Un-)marshal the message, the most the customers can see (and therefore
> > us) is a simple AxisFault. Unfortunately that does not help us see what
> > exactly is going wrong. So, is there a way for Axis to dump the complete
> > raw SOAP Envelope _before_ doing its work, so that we can something?
> > 
> > Many thanks in advance,
> > 
> > Jin-Ha Tchoe
> > --
> > Jin-Ha Tchoe <Ji...@evision.de>
> > 
> >
-- 
Jin-Ha Tchoe <Ji...@evision.de>


Re: How to dump the raw SOAP Envelope?

Posted by "C.C. Ang" <ch...@utiba.com>.
On Fri, Apr 08, 2005 at 01:34:34PM +0200, Vjeran Marcinko wrote:
> Hmmm... I think that any protocol wrapper library should have raw logging
> available at DEBUG level. That's one thing I love about Commons HttpClient.
> 
> -V.

I would have thought so....
For example, in SOAPpy (a python SOAP library), it is

#---

s = SOAPProxy(
     "http://localhost:8080/axis/EchoHeaders.jws",
     "",
     "" )

s.config.dumpSOAPOut = 1
s.config.dumpSOAPIn = 1
#---

The last 2 lines dumps the SOAP packet.

-- 
| mailto:chai@utiba.com  | +61 401 688 408
| How many boards would a Mongol hoard, if a Mongol hoard got bored.

-----------------
Utiba Pty Ltd 
This message has been scanned for viruses and
dangerous content by Utiba mail server and is 
believed to be clean.


Re: How to dump the raw SOAP Envelope?

Posted by Vjeran Marcinko <vj...@tis.hr>.
Hmmm... I think that any protocol wrapper library should have raw logging
available at DEBUG level. That's one thing I love about Commons HttpClient.

-V.

----- Original Message ----- 
From: "Peter Maas" <pe...@noterik.nl>
To: "Venkat Reddy" <vr...@gmail.com>
Cc: <ax...@ws.apache.org>
Sent: Friday, April 08, 2005 1:23 PM
Subject: Re: How to dump the raw SOAP Envelope?


>
> Why don't you trace the soap message on TCP level using a tool like
> ngrep or ethereal?
>
>
> On Fri, 2005-04-08 at 16:05 +0530, Venkat Reddy wrote:
> > You can write a tiny logging handler to do something like -
> >
> > Transformer transformer =
TransformerFactory.newInstance().newTransformer();
> > StringWriter stringWriter = new StringWriter(128);
> > transformer.transform(new DOMSource(env), new
StreamResult(stringWriter));
> > StringBuffer buffer =  stringWriter.getBuffer();
> >
> > - venkat



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.9.5 - Release Date: 7.4.2005


Re: How to dump the raw SOAP Envelope?

Posted by Peter Maas <pe...@noterik.nl>.
Why don't you trace the soap message on TCP level using a tool like
ngrep or ethereal?


On Fri, 2005-04-08 at 16:05 +0530, Venkat Reddy wrote:
> You can write a tiny logging handler to do something like - 
> 
> Transformer transformer = TransformerFactory.newInstance().newTransformer();
> StringWriter stringWriter = new StringWriter(128);
> transformer.transform(new DOMSource(env), new StreamResult(stringWriter));
> StringBuffer buffer =  stringWriter.getBuffer();
> 
> - venkat
> 
> On Apr 8, 2005 3:55 PM, Jin-Ha Tchoe <Ji...@evision.de> wrote:
> > Hi,
> > 
> > we use Axis 1.2 Alpha with Tomcat 4.0.3 and Castor 0.95 for a
> > SOAP-Service. Sometimes we have customers you are not accustomed to SOAP
> > and have lots of problems using our Service. The problems range from
> > simple typos and wrong namespaces to forgetting the SOAP-Envelope.
> > 
> > Whenever Axis and Castor are unable to determine the right Service or
> > (Un-)marshal the message, the most the customers can see (and therefore
> > us) is a simple AxisFault. Unfortunately that does not help us see what
> > exactly is going wrong. So, is there a way for Axis to dump the complete
> > raw SOAP Envelope _before_ doing its work, so that we can something?
> > 
> > Many thanks in advance,
> > 
> > Jin-Ha Tchoe
> > --
> > Jin-Ha Tchoe <Ji...@evision.de>
> > 
> >
> 
> 
-- 
Peter Maas
Application Architect / Streaming
 
Noterik Multimedia BV
Prins Hendrikkade 120
1011 AM Amsterdam
The Netherlands

Tel: +31 (0)205929966
Fax: +31 (0)204688405
Gsm: +31 (0)616096324

Web: www.noterik.nl
--------------------------------------
Take a look at our streaming solutions: 
http://www.streamedit.com/demo.html

Get firefox: 
http://www.mozilla.org/products/firefox/
---------------------------------------

:wq!


Re: How to dump the raw SOAP Envelope?

Posted by Venkat Reddy <vr...@gmail.com>.
You can write a tiny logging handler to do something like - 

Transformer transformer = TransformerFactory.newInstance().newTransformer();
StringWriter stringWriter = new StringWriter(128);
transformer.transform(new DOMSource(env), new StreamResult(stringWriter));
StringBuffer buffer =  stringWriter.getBuffer();

- venkat

On Apr 8, 2005 3:55 PM, Jin-Ha Tchoe <Ji...@evision.de> wrote:
> Hi,
> 
> we use Axis 1.2 Alpha with Tomcat 4.0.3 and Castor 0.95 for a
> SOAP-Service. Sometimes we have customers you are not accustomed to SOAP
> and have lots of problems using our Service. The problems range from
> simple typos and wrong namespaces to forgetting the SOAP-Envelope.
> 
> Whenever Axis and Castor are unable to determine the right Service or
> (Un-)marshal the message, the most the customers can see (and therefore
> us) is a simple AxisFault. Unfortunately that does not help us see what
> exactly is going wrong. So, is there a way for Axis to dump the complete
> raw SOAP Envelope _before_ doing its work, so that we can something?
> 
> Many thanks in advance,
> 
> Jin-Ha Tchoe
> --
> Jin-Ha Tchoe <Ji...@evision.de>
> 
>

Re: How to dump the raw SOAP Envelope?

Posted by Mike Barton <mb...@allesta.com>.
Try WSABI... available at http://sourceforge.net/projects/wsabi4axis/

It comes with handlers to persist SOAP messages.. both request and response.

--Mike

Jin-Ha Tchoe wrote:
> Hi,
> 
> we use Axis 1.2 Alpha with Tomcat 4.0.3 and Castor 0.95 for a
> SOAP-Service. Sometimes we have customers you are not accustomed to SOAP
> and have lots of problems using our Service. The problems range from
> simple typos and wrong namespaces to forgetting the SOAP-Envelope.
> 
>  Whenever Axis and Castor are unable to determine the right Service or
> (Un-)marshal the message, the most the customers can see (and therefore
> us) is a simple AxisFault. Unfortunately that does not help us see what
> exactly is going wrong. So, is there a way for Axis to dump the complete
> raw SOAP Envelope _before_ doing its work, so that we can something?
> 
> Many thanks in advance,
> 
> Jin-Ha Tchoe