ASP + SOAP

D

Dave Karmens

I have the following ASP:

<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%Response.Buffer=true%>
<%
const SoapServer = "http://localhost/Services/eDirectTest.asmx"
set xmldom = server.CreateObject("Microsoft.XMLDOM")
set xmlhttp = server.CreateObject("Microsoft.XMLHTTP")
xmlhttp.open "POST", SoapServer, false
xmlhttp.setRequestHeader "Man", POST & " " & SoapServer & " HTTP/1.1"
xmlhttp.setRequestHeader "MessageType", "CALL"
xmlhttp.setRequestHeader "ContentType", "text/xml"
xmlhttp.send(SoapStr)
set xmldom = xmlhttp.responseXML
response.write(xmldom.xml)
set xmlhttp = nothing : set xmldom = nothing
function SoapStr()
SoapStr = SoapStr & "<soap:Envelope
xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
xmlns:xsd=""http://www.w3.org/2001/XMLSchema""
xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">"
SoapStr = SoapStr & "<soap:Body>"
SoapStr = SoapStr & "<VerifyUser xmlns=""http://tempuri.org/"">"
SoapStr = SoapStr & "<pstrUserName>someone@localhost</pstrUserName>"
SoapStr = SoapStr & "<pstrPassword>pass</pstrPassword>"
SoapStr = SoapStr & "<pstrChannel>DIRECT</pstrChannel>"
SoapStr = SoapStr & "</VerifyUser>"
SoapStr = SoapStr & "</soap:Body>"
SoapStr = SoapStr & "</soap:Envelope>"
end function
%>

However, when I try and execute it I get:

<?xml version="1.0" ?>
- <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <soap:Body>
- <soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Unable to handle request without a valid action
parameter. Please supply a valid soap action.</faultstring>
<detail />
</soap:Fault>
</soap:Body>
</soap:Envelope>


What should I be looking for to fix this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,146
Messages
2,570,832
Members
47,374
Latest member
EmeliaBryc

Latest Threads

Top