12

I'm publishing a test WS implementation using Endpoint.publish() for consumption in Visual Studio. According to the documentation the default SOAP binding is 1.1 and it is possible to change the bindings, but I can't figure out specifically how to change the binding to 1.2.

Any help is appreciated!

CoolBeans
  • 20,654
  • 10
  • 86
  • 101
jluce50
  • 1,173
  • 3
  • 11
  • 14

2 Answers2

9

With JAX-WS 2.x you can either enable SOAP 1.2 via config file or via Java 5 annotation. See here (original, now broken link) for more details.

vanto
  • 3,134
  • 18
  • 28
2

Since the current answer is not valid and the links are broken

By Class Annotation

@BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)

By Code configuration

JaxWsClientFactoryBean factory = new JaxWsClientFactoryBean();
...
factory.setBindingId(SOAPBinding.SOAP12HTTP_BINDING);

By xml configuration

<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>
Marc Magon
  • 713
  • 7
  • 11