标签:
一. 基于xfire实现的WebService
HttpServletRequest request = XFireServletController.getRequest();
二. 基于axis实现的WebService
MessageContext mc = MessageContext.getCurrentMessageContext();
HttpServletRequest request = (HttpServletRequest)mc.getProperty(HTTPConstants.MC_HTTP_SERVLETREQUEST);
三. 基于jax-ws实现的WebService
@Resource private WebServiceContext wsContext; MessageContext mc = wsContext.getMessageContext(); HttpServletRequest request = (HttpServletRequest)mc.get(MessageContext.SERVLET_REQUEST);
不同框架实现的WebService的服务端获取HttpServletRequest的方法
标签:
原文地址:http://www.cnblogs.com/longshiyVip/p/4969163.html