[英]How to change JAVAX-WS Endpoint binding to SOAP 1.2?
我正在使用Endpoint.publish()
发布一个测试 WS 实现,以便在 Visual Studio 中使用。 根据文档,默认 SOAP 绑定是1.1
并且可以更改绑定,但我无法具体弄清楚如何将绑定更改为1.2
。
任何帮助表示赞赏!
使用 JAX-WS 2.x,您可以通过配置文件或通过 Java 5 注释启用 SOAP 1.2。 有关更多详细信息,请参见此处(原始链接,现已断开链接)。
由于当前答案无效并且链接已损坏
由 Class 注解
@BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)
按代码配置
JaxWsClientFactoryBean factory = new JaxWsClientFactoryBean();
...
factory.setBindingId(SOAPBinding.SOAP12HTTP_BINDING);
通过 xml 配置
<binding name="headwig">
<wsoap12:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="weave">
<wsoap12:operation soapAction="" style="documment"/>
<input name="grain">
<wsoap12:body .../>
<wsoap12:header message="QName" part="partName"
use="literal|encoded"
encodingStyle="encodingURI"
namespace="namespaceURI" />
</input>
...
</binding>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.