1. A SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint.
问题原因:
客户端和服务端的SOAP协议版本不一致。
解决方法:
①修改客户端SOAP协议版本和服务端一致
②修改服务端SOAP协议版本和客户端一致
附Java服务端修改服务暴露SOAP版本方法:
在接口的实现类上面添加注解
1
2
3
4
5
6
|
//import javax.xml.ws.BindingType; //import javax.xml.ws.soap.SOAPBinding; @BindingType(SOAPBinding.SOAP12HTTP_BINDING) //1.2 @BindingType(SOAPBinding.SOAP11HTTP_BINDING) //1.1 |
2. MustUnderstand headers: [{http://www.w3.org/2005/08/addressing}Action, {http://www.w3.org/2005/08/addressing}To] are not understood
问题原因:
C#调用Java服务时,请求时添加了ws-addressing 信息,而CXF默认没有打开ws-addressing开关,会出现上述warn
解决方法:
①在app-context-service.xml 下的服务暴露中,添加以下节点,以支持ws-addressing。
1
2
3
4
5
6
|
<jaxws:endpoint id= "javaMonitorConfigService" implementor= "#monitorConfigService" address= "/javaMonitorConfigService" > <jaxws:features> <wsa:addressing xmlns:wsa= "http://cxf.apache.org/ws/addressing" /> </jaxws:features> </jaxws:endpoint> |