title: Spring WS Invalid Content Type
body: <p>I have a Spring WS client. I generated the WSDL stubs via wsimport. </p>
  
  <p>When I try to send a request, I get a Invalid Content-type exception:</p>
  
  <blockquote>
    <p>SEVERE: SAAJ0537: Invalid Content-Type. Could be an error message instead of a SOAP message
    Exception in thread "main" org.springframework.ws.soap.SoapMessageCreationException: Could not create message from InputStream: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?; nested exception is com.sun.xml.messaging.saaj.SOAPExceptionImpl: Invalid Content-Type:text/html. Is this an error message instead of a SOAP response?</p>
  </blockquote>
  
  <p>Is this an indication that the message I sent has an invalid content-type or the response I receive has an invalid content-type? If it's on the client side, how do I set up the content-type?</p>
  
  <p>I tried mocking the web service via Soap UI. I'm able to send and receive correct response.</p>
  
  <p>Edit:</p>
  
  <p>On my log, it's shown that the request is sent:</p>
  
  <blockquote>
    <p>DEBUG [org.springframework.ws.client.MessageTracing.sent] - Sent request </p>
  </blockquote>
  
  <p>Then I get that exception:</p>
  
  <blockquote>
    <p>Exception in thread "main" org.springframework.ws.soap.SoapMessageCreationException:</p>
  </blockquote>