title: Producing SOAP webservices with spring-ws with Soap v1.2 instead of the default v1.1
body: <p>I am currently working on Spring soap server project. I started off with the Getting Started guide from Spring here <a href="http://spring.io/guides/gs/producing-web-service/" rel="noreferrer">http://spring.io/guides/gs/producing-web-service/</a> to build a basic SOAP service.</p>
  
  <p>The default SOAP protocol is SOAP v1.1. Is there a way I could set the protocol to v1.2, possibly via annotations?</p>
  
  <p>I tried <code>@BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)</code> annotation on the <code>@Endpoint</code> class but it doesnt seem to work.</p>
  
  <p>I also tried <code>@Endpoint(value = SOAPBinding.SOAP12HTTP_BINDING)</code> to set it, but this doesnt work either as seen in the logs on startup</p>
  
  <pre><code>INFO --- [nio-8080-exec-1] o.s.ws.soap.saaj.SaajSoapMessageFactory  :
   Creating SAAJ 1.3 MessageFactory with SOAP 1.1 Protocol
  </code></pre>
  
  <p>Ofcourse, if I post a SOAP request to the server, I get the following error</p>
  
  <pre><code>2015-01-19 15:50:17.610 ERROR 20172 --- [nio-8080-exec-1] c.sun.xml.internal.messaging.saaj.soap : SAAJ0533: Cannot create message: incorrect content-type for SOAP version. Got application/soap+xml;
   charset=utf-8, but expected text/xml
  2015-01-19 15:50:17.611 ERROR 20172 --- [nio-8080-exec-1] c.sun.xml.internal.messaging.saaj.soap   :
   SAAJ0535: Unable to internalize message
  2015-01-19 15:50:17.617 ERROR 20172 --- [nio-8080-exec-1] a.c.c.C.[.[.[.[messageDispatcherServlet] :
   Servlet.service() for servlet [messageDispatcherServlet] in context with path [] threw exception [R
  equest processing failed; nested exception is org.springframework.ws.soap.SoapMessageCreationException: Could not create message from InputStream: Unable to internalize message; nested exception is com.sun.xml.internal.messaging.saaj.SOAPExceptionImpl: Unable to internalize message] with root cause
  
  com.sun.xml.internal.messaging.saaj.soap.SOAPVersionMismatchException: Cannot create message: incorrect content-type for SOAP version. Got: application/soap+xml; charset=utf-8 Expected: text/xml
          at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.init(Unknown Source)
          at com.sun.xml.internal.messaging.saaj.soap.MessageImpl.&lt;init&gt;(Unknown Source)
          at com.sun.xml.internal.messaging.saaj.soap.ver1_1.Message1_1Impl.&lt;init&gt;(Unknown Source)
          at com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl.createMessage(Unknown Source)
  </code></pre>
  
  <p>Any help is appreciated.</p>
  
  <p>Thanks!</p>