`

Cxf soap协议改成1.2

阅读更多

在和.net做联调的时候,报错

 

A SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint.

看来是soap协议不匹配

在接口或实现类上声明

@BindingType(value = "http://www.w3.org/2003/05/soap/bindings/HTTP/")

或者

@BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)

注意要引入geronimo-jaxws_2.2_spec-1.0.jar包

生成的wsdl文件我们可以看到

xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/

分享到:
评论
1 楼 hs798630734 2011-06-27  
为什么我这加这句@BindingType(value=javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)就报错呢?
The annotation @BindingType is disallowed for this location,求解

相关推荐

Global site tag (gtag.js) - Google Analytics