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 Augusto Arcoverde da Rocha <ag...@gmail.com> on 2006/11/09 19:40:11 UTC

How to access http header from a service class.

Hi all,

Exist a way to access the http header from my service class when using Axis2?

I want to get some client informations from the http header.

Thanks,
Augusto Arcoverde da Rocha

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


Re: How to access http header from a service class.

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi  Augusto ;

Inside the service impl class you can get access to the current message
context

MessageContext msgCtx = MessageContext.getCurrentContext();

and from the msg context you can get the http req , so from that you can
get whatever the headers that you want.
HttpServletRequest obj =(HttpServletRequest)
msgCtx.getProperty("transport.http.servletRequest");

Thanks
Deepal

> Hi all,
>
> Exist a way to access the http header from my service class when using
> Axis2?
>
> I want to get some client informations from the http header.
>
> Thanks,
> Augusto Arcoverde da Rocha
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>

-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



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