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 Vogt Burkhard EXT <Bu...@mchh.siemens.de> on 2004/10/12 11:05:08 UTC

How to extract the SOAP object from a HttpServletRequest

Hi,

I'm sitting in the middle between a SOAP Client and (one or more) services, operating as a web-service proxy. 
As a tomcat (5.x, java 1.4.2) application I receive the SOAP headers as expected but additionaly I need to 
receive the SOAP object from the request in order to delegate the processing to the appropriate web service.

Does anybody know how to do this?

Thanks in advance for your time and any hints.

Regards,
Burkhard

Re: How to extract the SOAP object from a HttpServletRequest

Posted by sm...@spansurf.com.
OK,

You can read the request from the HTTP request stream but once you do the 
request is no longer in the stream and trying to pass it on to its destination 
for handling will fail as the request is no longer available having been read 
earlier. I think the headers you are getting are infact HTTP headers as SOAP 
headers are burried in the SOAPEnvelope which you dont have.

What you then need to do is wrap the request within a new stream where you can 
make the previously read stream contents available i.e. as a byte stream 
further down the handling chain.

I have a filter that does just this. It audits all SOAP requests including 
HTTP headers and the body, then passes the request on down the handling chain. 
This can be an expensive process so use with caution.

I have attached the relevant files to this mail for you.

Regards

Steve


Quoting Vogt Burkhard EXT <Bu...@mchh.siemens.de>:

> Hi,
> 
> I'm sitting in the middle between a SOAP Client and (one or more) services,
> operating as a web-service proxy. 
> As a tomcat (5.x, java 1.4.2) application I receive the SOAP headers as
> expected but additionaly I need to 
> receive the SOAP object from the request in order to delegate the processing
> to the appropriate web service.
> 
> Does anybody know how to do this?
> 
> Thanks in advance for your time and any hints.
> 
> Regards,
> Burkhard
> 




Re: How to extract the SOAP object from a HttpServletRequest

Posted by Mahen Perera <ma...@gmail.com>.
Hi Burkhard,

If ur using a SOAP engine such as Axis, then u dont have to worry
about this. The SOAP engine itself will extract the SOAP message and
call the correct Web Service.

Hope this answers ur Query..

I guess I Need more elaboration on ur Q.

Mahen

On Tue, 12 Oct 2004 11:05:08 +0200, Vogt Burkhard EXT
<bu...@mchh.siemens.de> wrote:
> Hi,
> 
> I'm sitting in the middle between a SOAP Client and (one or more) services, operating as a web-service proxy.
> As a tomcat (5.x, java 1.4.2) application I receive the SOAP headers as expected but additionaly I need to
> receive the SOAP object from the request in order to delegate the processing to the appropriate web service.
> 
> Does anybody know how to do this?
> 
> Thanks in advance for your time and any hints.
> 
> Regards,
> Burkhard
>