Get SOAP to work in classic ASP

I'm trying to get SOAP to work in classic asp.

Here's the code:
set xmldom = server.CreateObject("Microsoft.XMLDOM")
set xmlhttp = server.CreateObject("Microsoft.XMLHTTP")

const SoapServer = "" "POST", SoapServer, false
xmlhttp.setRequestHeader "Man", POST & " " & SoapServer & " HTTP/1.1"
xmlhttp.setRequestHeader "MessageType", "CALL"
xmlhttp.setRequestHeader "Content-Type", "text/xml"

'Anything other than 200 means error.
if xmlhttp.Status = 200 then
  'collects the data returned.
  Set xmldom = xmlhttp.responseXML
  'writes it to the screen.

'Just some error checking. I use this to see why its messing up.
  Response.Write("Didn't Work")

 'Writes the error code  returned by the server.

  'Writes the accompanying text.
End if

set xmlhttp = nothing
set xmldom = nothing


Here's the response:
Didn't Workstatus=405Method Not AllowedHTTP_ACCEPT:*/* HTTP_ACCEPT_ENCODING:gzip, deflate HTTP_ACCEPT_LANGUAGE:en-us HTTP_USER_AGENT:Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; .NET CLR 2.0.50727) HTTP_X_FORWARDED_FOR:

soap_rate_request.xml is an xml file with the soap envelope. I could show that but there is no way to attach files in Experts Exchange
Richard KortsAsked:
Who is Participating?
Two things:
1) Are you sure is valid address? It doesn't seem to host any web service

2) xmlhttp.setRequestHeader "Man", POST & " " & SoapServer & " HTTP/1.1"
What is POST? Are you sure you aren't missing quotes?
xmlhttp.setRequestHeader "Man", "POST " & SoapServer & " HTTP/1.1"
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.