title: Sending a 'application/soap+xml' SOAP request using Classic ASP
body: <p>Any help with this would be appreciated; I've been at it for a few days now.</p>
  
  <p>Below is the code that I've got so far; unfortunatly when I run it I get a HTTP 415 error; <strong><em>Cannot process the message because the content type 'text/xml; charset=UTF-8' was not the expected type 'application/soap+xml; charset=utf-8'</em></strong>.</p>
  
  <p>I have to send the content-type of application/soap+xml as this is the only type that the web service allows; and I have to do it in classic ASP.</p>
  
  <p>I've tried changing the 'send' line to "objRequest.send objXMLDoc.XML" but this then gives me a <strong><em>HTTP 400 Bad Request</em></strong> error.</p>
  
  <hr>
  
  <pre><code>strXmlToSend = "&lt;some valid xml&gt;"
  webserviceurl = "http://webservice.com"
  webserviceSOAPActionNameSpace = "avalidnamespace"
  
  Set objRequest = Server.createobject("MSXML2.XMLHTTP.3.0")
  objRequest.open "POST", webserviceurl, False
  
  objRequest.setRequestHeader "Content-Type", "application/soap+xml"
  objRequest.setRequestHeader "CharSet", "utf-8"
  objRequest.setRequestHeader "action", webserviceSOAPActionNameSpace &amp; "GetEstimate"
  objRequest.setRequestHeader "SOAPAction", webserviceSOAPActionNameSpace &amp; "GetEstimate"
  
  Set objXMLDoc = Server.createobject("MSXML2.DOMDocument.3.0")
  objXMLDoc.loadXml strXmlToSend
  objRequest.send objXMLDoc
  set objXMLDoc = nothing
  </code></pre>