title: Get simple response from SOAP service with classic asp
body: <p>I have been tasked with obtaining a response from a SOAP request, using classic asp.  The request is about as basic as it gets - I just need to fire off 3 parameters to a web service URL and write out the response (which is in simple plain text format).  I've checked the service using a couple of SOAP testing utilities and it outputs the response fine.</p>
  
  <p>I've also read about 10 different tutorials on consuming SOAP feeds in classic ASP, but none of them seem to work at all.</p>
  
  <p>The latest one I'm trying has given me the following code:</p>
  
  <pre><code>&lt;%
  Set oXmlHTTP = CreateObject("Microsoft.XMLHTTP")
  oXmlHTTP.Open "POST", "http://www.webservicehost.co.uk/B2bservice.asmx?wsdl", False 
  
  oXmlHTTP.setRequestHeader "Content-Type", "application/soap+xml; charset=utf-8" 
  oXmlHTTP.setRequestHeader "SOAPAction", "http://ourNameSpace/ourFunction"
  
  SOAPRequest = _
    "&lt;?xml version=""1.0"" encoding=""utf-8""?&gt;" &amp;_
    "&lt;soap12:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap12=""http://www.w3.org/2003/05/soap-envelope""&gt;" &amp;_
      "&lt;soap12:Body&gt;" &amp;_
        "&lt;ourFunction xmlns=""http://ourNameSpace/""&gt;" &amp;_
          "&lt;Ccode&gt;OurCode&lt;/Ccode&gt;" &amp;_
          "&lt;Pword&gt;1d2s45a&lt;/Pword&gt;" &amp;_
          "&lt;OrderNo&gt;9876&lt;/OrderNo&gt;" &amp;_
        "&lt;/ourFunction&gt;" &amp;_
      "&lt;/soap12:Body&gt;" &amp;_
    "&lt;/soap12:Envelope&gt;"
  oXmlHTTP.send SOAPRequest
  
  response.write oXmlHTTP.responseText
  %&gt;
  </code></pre>
  
  <p>I have all the correct values for the POST URL, the Ccode, Pword and OrderNo variables, but have no idea what to use for the "SoapAction" or  values.  As a result, when I run the page I just get an error:</p>
  
  <p>soap:SenderUnable to handle request without a valid action parameter. Please supply a valid soap action.</p>
  
  <p>Can anyone suggest what to use for the SoapAction and ourFunction xmlns values?</p>
  
  <p>Many thanks for any pointers...</p>