2
我使用一种SOAPHandler这是我的getHeaders
方法在客户端:头没有得到被注入到请求
@Override
public Set<QName> getHeaders() {
String uri = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
QName security_hdr = new QName(uri, "Security", "wsse");
HashSet<QName> headers = new HashSet<QName>();
headers.add(security_hdr);
System.out.println("Headers: " + headers);
return headers;
}
的SystemOut在上述生产线生产这种代码,所以肯定我没有从返回的东西我方法:
Headers: [{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}Security]
然而,试图捕捉请求TCPMon的的时候,我看不到头的。
POST /ws/server HTTP/1.1
Content-type: text/xml;charset="utf-8"
Soapaction: ""
Accept: text/xml, multipart/related, text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
User-Agent: JAX-WS RI 2.1.6 in JDK 6
Host: 127.0.0.1:4027
Connection: keep-alive
Content-Length: 170
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body><ns2:getServerName xmlns:ns2="http://ws.ronixus.com/"/></S:Body>
</S:Envelope>
任何想法我在这里失踪?我已经从其他回调方法handleMessage
注释掉了代码,以确保没有任何内容会覆盖标题。
感谢您的回复。是的,'soapHeader'为null。 – Jops
似乎从HandlerProcessor的callBack无法成功设置(抓头)。 – Jops