axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Walker, Jeff" <>
Subject RE: Axis 1.3: Need to retrieve HTTP Headers in incoming request, in source code
Date Mon, 18 Jun 2007 21:54:09 GMT
I thought that too.
But this is in a message handler on the clientside, not the servcie
side. It definitely works on the serverside, in a handler class, but
handlers on the clientside return null to this:

HttpServletRequest req =
if (req!= null) {
    java.util.Enumeration enum = req.getHeaderNames();
    while (enum.hasMoreElements()) {
        String name = (String)enum.nextElement();
        System.out.println("Found a header called: " + name + ", with
value = " + req.getHeader(name));
    System.out.println("The req is null");

The above code is in the handleRequest(MessageContext context); method
in a GenericHandler sub-class on the clientside. The call to
getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST) returns me null every
Unless I am doing soemthing wrong, of course.


-----Original Message-----
From: [] On Behalf Of
Jeff Greif
Sent: Monday, June 18, 2007 5:47 PM
Subject: Re: Axis 1.3: Need to retrieve HTTP Headers in incoming
request, in source code

I believe that from the MessageContext you can get the
HttpServletRequest, and from that, the request headers.


On 6/18/07, Walker, Jeff <> wrote:
> Hi,
> I'm using Axis 1.3.
> I have a need to see all of the HTTP Headers in the incoming request
> the client to the service. I tried retrieving all of the property
names from
> the MessageContext in my handleRequest(MessageContext context), but
none of
> them seemed to be the HTTP Headers I am looking for. I need to see
this kind
> of information in front of the SOAP envelope:
> ...
> POST /ExampleWebService/services/ExampleAxisService
> HTTP/1.0
> Content-Type: text/xml; charset=utf-8
> Accept: application/soap+xml, application/dime, multipart/related,
> User-Agent: Axis/1.3
> Host:
> Cache-Control: no-cache
> Pragma: no-cache
> SOAPAction: ""
> Content-Length: 445
> ...
> I caught the above using TCPMon, but I'd like to do the same in the
> code, preferrably in a Message Handler class, or something.
> Thanks,
> -jeff

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message