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 Bartolomeo Nicolotti <bn...@siapcn.it> on 2010/06/23 17:13:50 UTC

Log all http request

Hello,

we've a web service that receives SOAP RPC-encoded xml requests on HTTP
through axis and tomcat 5.5.

We'd like to log every xml rq we receive using a Filter, because we've
to write the xml to a file whose name depends on the xml request.

The problem is that one can call SevletRequest.getReader once.

So we extended

HttpServletRequestWrapper 

with the class in attachment, to read the request body once in a string
and then to wrap the getReader method. Then we create a "clone" of the
request we receive in the filter 

Is this a good way or there's another standard way to read HTTP request
body in a Filter? 

Should we implement an axis handler?

Many many thanks in advance 

Best regards 

Bartolomeo


RE: Log all http request

Posted by Bartolomeo Nicolotti <bn...@siapcn.it>.
Hello,

maybe it was not clear, but I'm talking about the server side. Is what
you suggest possible on the server side? The problem is that in the xml
the server receive there's a value that has to be put in the name of the
file where the xml will be saved.

Many thanks

Best regards.

Bartolomeo

Il giorno lun, 28/06/2010 alle 12.51 -0400, Betts, Hendry ha scritto:
> Why not just log the httpclient.wire logger to a different level and
> destination.  It captures everything that is sent via the httpclient.
> 
> Hendry
> -----Original Message-----
> From: Bartolomeo Nicolotti [mailto:bnicolotti@siapcn.it] 
> Sent: Wednesday, June 23, 2010 11:14 AM
> To: Tomcat Developers List; Tomcat Users List; axis-user
> Cc: Livio Costamagna; Marco Rosa; Gianpaolo Maggiore
> Subject: Log all http request
> 
> Hello,
> 
> we've a web service that receives SOAP RPC-encoded xml requests on HTTP
> through axis and tomcat 5.5.
> 
> We'd like to log every xml rq we receive using a Filter, because we've
> to write the xml to a file whose name depends on the xml request.
> 
> The problem is that one can call SevletRequest.getReader once.
> 
> So we extended
> 
> HttpServletRequestWrapper 
> 
> with the class in attachment, to read the request body once in a string
> and then to wrap the getReader method. Then we create a "clone" of the
> request we receive in the filter 
> 
> Is this a good way or there's another standard way to read HTTP request
> body in a Filter? 
> 
> Should we implement an axis handler?
> 
> Many many thanks in advance 
> 
> Best regards 
> 
> Bartolomeo
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


RE: Log all http request

Posted by "Betts, Hendry" <He...@viasat.com>.
Why not just log the httpclient.wire logger to a different level and
destination.  It captures everything that is sent via the httpclient.

Hendry
-----Original Message-----
From: Bartolomeo Nicolotti [mailto:bnicolotti@siapcn.it] 
Sent: Wednesday, June 23, 2010 11:14 AM
To: Tomcat Developers List; Tomcat Users List; axis-user
Cc: Livio Costamagna; Marco Rosa; Gianpaolo Maggiore
Subject: Log all http request

Hello,

we've a web service that receives SOAP RPC-encoded xml requests on HTTP
through axis and tomcat 5.5.

We'd like to log every xml rq we receive using a Filter, because we've
to write the xml to a file whose name depends on the xml request.

The problem is that one can call SevletRequest.getReader once.

So we extended

HttpServletRequestWrapper 

with the class in attachment, to read the request body once in a string
and then to wrap the getReader method. Then we create a "clone" of the
request we receive in the filter 

Is this a good way or there's another standard way to read HTTP request
body in a Filter? 

Should we implement an axis handler?

Many many thanks in advance 

Best regards 

Bartolomeo


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org