我想在致电之前将会话中的一些值添加到SOAPHeader
public class AddSOAPHeaderOutInterceptor extends AbstractSoapInterceptor {
public AddSOAPHeaderOutInterceptor() {
super(Phase.PRE_STREAM);
this.addAfter(SoapOutInterceptor.class.getName());
}
@Override
public void handleMessage(SoapMessage message) throws Fault {
List<Header> listHeaders = message.getHeaders();
HttpServletRequest servletRequest = (HttpServletRequest) message.get(AbstractHTTPDestination.HTTP_REQUEST);
//servletRequest is null after get from SoapMessage
}
但是我遇到一个问题,当从HttpServletRequest
中提取null
实例是SoapMessage
我认为调用此拦截器时phase
有问题。
有什么方法可以从这里获取session
吗?