KH,
> If you're using the RPCRouterServlet, then the Call object that is
extracted
> from the Envelope has the Headers.
> Vector v = call.getHeader.getHeaderEntries();
You are right that the header can be extracted from the Envelope I get
when I use Message-based service. However, I want to "look" at the
header even before it reaches the RPCRouterServlet. I want to use Filter
support provided by Tomcat 4.0 to intercept the requests. The Filter can
be installed to intercept any request _before_ it is delivered to the
servlet.
I am able to install the Filter succesfully and also intercept the
request. But I don't know how to read the Header. Here is the method on
the Filter that gets called:
public void doFilter(ServletRequest req, ServletResponse res,
FilterChain filterChain)
So my basic problem is how to extract the Header information given just
the ServletRequest object.
I tried using "getInputStream()" method on the ServletRequest object and
am able to read the contents. However, since the inputstream has been
"read/touched", I get the following error when the request eventually
reaches the Servlet.
Ouch, the call failed:
Fault Code = SOAP-ENV:Protocol
Fault String = Premature end of stream. Data is truncated. Read -1
bytes successfully, expected 1719
Is there another way that I could look at the contents of a
ServletRequest without getting this error?
Any ideas/suggestions on what I could do?
Thanks,
- Prashant
> The Header value is stored as the first child of the Element whose
name is
> the name you have assigned in the client.
> See http://marc.theaimsgroup.com/?l=soap-user&m=99064627103560&w=2 for
a
> similar problem.
>
> G'luck,
> --KH
>
> -----Original Message-----
> From: Prashant Jain [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 26, 2001 5:30 AM
> To: [EMAIL PROTECTED]
> Subject: using soap with tomcat 4.0b6 filter support
>
>
> Hi,
>
> Has anyone tried using SOAP with the Filter functionality of Tomcat
4.0
> (beta 6)? On my client side, I am creating a SOAP header and inserting
> some data in it. What I would like to be able to do is to extract this
> data using a Filter which I install in the servlet container (tomcat).
>
> I am able to intercept the request in my filter but am not sure how to
> extract a SOAP header given just an HttpServletRequest.
>
> Any help would be appreciated.
>
> Thanks,
>
> - Prashant
>