How to change JAVAX-WS Endpoint binding to SOAP 1.2?

后端 未结 2 757
灰色年华
灰色年华 2021-02-20 08:50

I\'m publishing a test WS implementation using Endpoint.publish() for consumption in Visual Studio. According to the documentation the default SOAP binding is

相关标签:
2条回答
  • 2021-02-20 08:55

    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>
    
    0 讨论(0)
  • 2021-02-20 09:07

    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.

    0 讨论(0)
提交回复
热议问题