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 sa...@bt.com on 2002/08/21 15:51:50 UTC

Help with Intercepting SOAP messages

All,

I was hoping for some guidance on SOAP message interception mechanism.

I am using Tomcat 4.0.3, using AXIS Beta 3 and in accordance to Servlet 2.3
I have defined a Filter which filters all requests going to the AXIS
Servlet.

The SOAP body is passed through in an ServletInputStream which I can read,
then for audit trailing, get other information from ServletRequest object
and log it. This is all working fine, which is good.

BUT the AXIS Servlet does not seem to read the ServletInputStream any
longer. Does it mean that if the ServletInputStream is read once then it
cannot be read twice?

I attempted reset method on ServletInputStream, which is not supported!!!
Hence it did not help.

Does it imply that SOAP messages served by AXIS on Tomcat, cannot be audit
trailed, or am I being a dumbo -)

Please advise/suggest .....

Regards and TIA,

Santosh


Re: Help with Intercepting SOAP messages

Posted by Ulrich Winter <ul...@gmx.de>.
Instead of intercepting the soap message at the http transport layer in the
servlet engine, you should consider writing a custom axis handler.

Axis is designed for plugging in MessageHandler which could process parts of
the soap message before or after the service is invoked.

Look at the architecture doc for more details.
There is also a book, where this is described in more detail:
AXIS: The next generation of Java SOAP
by Romin Irani, S Jeelani Basha
http://www.amazon.com/exec/obidos/tg/detail/-/1861007159

Uli

----- Original Message -----
From: <sa...@bt.com>
To: <ax...@xml.apache.org>
Sent: Wednesday, August 21, 2002 3:51 PM
Subject: Help with Intercepting SOAP messages


> All,
>
> I was hoping for some guidance on SOAP message interception mechanism.
>
> I am using Tomcat 4.0.3, using AXIS Beta 3 and in accordance to Servlet
2.3
> I have defined a Filter which filters all requests going to the AXIS
> Servlet.
>
> The SOAP body is passed through in an ServletInputStream which I can read,
> then for audit trailing, get other information from ServletRequest object
> and log it. This is all working fine, which is good.
>
> BUT the AXIS Servlet does not seem to read the ServletInputStream any
> longer. Does it mean that if the ServletInputStream is read once then it
> cannot be read twice?
>
> I attempted reset method on ServletInputStream, which is not supported!!!
> Hence it did not help.
>
> Does it imply that SOAP messages served by AXIS on Tomcat, cannot be audit
> trailed, or am I being a dumbo -)
>
> Please advise/suggest .....
>
> Regards and TIA,
>
> Santosh
>