axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zhang zhongliang" <zzl_5...@163.com>
Subject Re:Re: How to get attributes from HttpServletRequest?
Date Wed, 22 Aug 2007 08:42:10 GMT
I do not know what to say,but you did a great favor for me.
thanks a lot.

在2007-08-22,"Saminda Abeyruwan" <samindaa@gmail.com> 写道:

In AxisServlet, it set the httpservletrequest/response as 
msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST, request);
        msgContext.setProperty(HTTPConstants.MC_HTTP_SERVLETRESPONSE, response);

Thus, in your web service you should be able to get it as follows,

MessageContext.getCurrentMessageContext().getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);

or if you need transport headers only

Map map = (Map)MessageContext.getCurrentMessageContext().getProperty( MessageContext.TRANSPORT_HEADERS);

Thank you

Saminda 


On 8/22/07, Zhang zhongliang <zzl_5337@163.com > wrote: 
I have a question about axis2.When the client send a request,and the protocol is http,for
example, http://domain/myservice,the client has a unique id that stored in the database,or
it provides a client certificate.I can get the id or certificate at my Filter.
Now I want get the id in the web service,is there any way to pass the value that set in the
HttpServletRequest object to the service?
Any advice will be appreciated! 




网 易 Yeah.net 免 费 邮 箱 全 新 改 版,珍 藏 帐 号 开 放,快 来 抢 注
>> 



-- 
Saminda Abeyruwan

Software Engineer
WSO2 Inc. - www.wso2.org
Mime
View raw message