How do I make JAX-WS endpoint accept SOAP1.2 messages
<p>I have a Spring Boot based project using CXF to build a SOAP Web Service.</p>

<p>Sending SOAP 1.1 messages (using SOAPUI) works fine, but when I try to send SOAP 1.2 messaged (using the same WSDL of course) I get the message <code>"A SOAP 1.2 message is not valid when sent to a SOAP 1.1 only endpoint"</code>.
The message is self explaining, but I can't understand why my endpoint doesn't accept 1.2 messages.</p>

<p>My WSDL contains the correct bindings and namespaces for soap12.</p>

<p>In my spring @Configuration class I added this to the CXF endpoint bean:</p>

<pre><code>    endpoint.setBindingConfig(new BindingConfiguration()
    {
        @Override
        public String getBindingId()
        {
            return SOAPBinding.SOAP12HTTP_MTOM_BINDING;
        }
    });
</code></pre>

<p>That didn't help.
As I became more desperate, I tried both the <code>@BindingType</code> and <code>@SOAPBinding</code> annotations which of course didn't work, then I tried <code>SaajSoapMessageFactory</code> with <code>SoapVersion.SOAP_12</code>. Didn't work. I tried <code>&lt;extension&gt;true&lt;/extension&gt;&lt;protocol&gt;Xsoap1.2&lt;/protocol&gt;</code> in my <code>jaxws-maven-plugin</code>. Failed.</p>

<p>The endpoint is clearly not configured for receiving SOAP 1.2 messages. How do I achieve this?</p>