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?
<%@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?