CXF SOAP JAX-WS WSS4JIN侦听器更改命名空间并导致解组错误

CXF SOAP JAX-WS WSS4JIN侦听器更改命名空间并导致解组错误,soap,cxf,unmarshalling,saaj,Soap,Cxf,Unmarshalling,Saaj,我在端点中使用WSS4JInInterceptor来验证授权 我的端点上有这个 这是我的SOAP消息 <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header> <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-

我在端点中使用WSS4JInInterceptor来验证授权

我的端点上有这个

这是我的SOAP消息

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header>
          <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                 <wsse:UsernameToken wsu:Id="UsernameToken-1">
                       <wsse:Username>username</wsse:Username>
                       <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"/>
                 </wsse:UsernameToken>
          </wsse:Security>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
          <newAsset xmlns="http://api.com.acme/">
                 <date xmlns="">2018-02-04T14:35:59Z</date>
                 <assetId xmlns="">1</assetId>
          </newAsset>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

用户名
2018-02-04T14:35:59Z
1.
我将消息跟踪到WSS4JInInterceptor中,发现接收到的SOAP消息被重写为:(替换的空白名称空间)


用户名
2018-02-04T14:35:59Z
1.
这会导致解组错误

但是

如果我在SOAP消息中做了一点更改(添加前缀)以发送此消息,WSS4JInInterceptor将不会更改默认名称空间,消息将被接受

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header>
          <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                 <wsse:UsernameToken wsu:Id="UsernameToken-1">
                       <wsse:Username>username</wsse:Username>
                       <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"/>
                 </wsse:UsernameToken>
          </wsse:Security>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
          <api:newAsset xmlns:api="http://api.com.acme/">
                 <date xmlns="">2018-02-04T14:35:59Z</date>
                 <assetId xmlns="">1</assetId>
          </api:newAsset>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

用户名
2018-02-04T14:35:59Z
1.

有办法避免吗?第一条消息是有效的,因此应该接受它。我必须在我的xsd中放一些东西吗?我用的是不合格的。我正在使用CXF 3.0.0更新到CXF 3.0.3,看看它是否仍然失败。我认为这方面有一些问题最近已经解决了。如果仍然失败,请用测试用例记录一个bug。

我在主页上没有看到3.0.3。但它在maven存储库中。现在我必须测试它的回归。谢谢,阿加尼,我会发布另一个问题,但也只是在这里跟踪一下。现在我可以处理接收到的soap消息了。但当我有一个xsd验证错误(约束)像数字
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
   <SOAP-ENV:Header>
          <wsse:Security SOAP-ENV:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                 <wsse:UsernameToken wsu:Id="UsernameToken-1">
                       <wsse:Username>username</wsse:Username>
                       <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"/>
                 </wsse:UsernameToken>
          </wsse:Security>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
          <api:newAsset xmlns:api="http://api.com.acme/">
                 <date xmlns="">2018-02-04T14:35:59Z</date>
                 <assetId xmlns="">1</assetId>
          </api:newAsset>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>