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/
posted @ 2015-11-27 13:21  人生设计师  阅读(813)  评论(0编辑  收藏  举报