下面是完整代码,就是得不到结果。
<%
url = "HTTP://API.510769.COM/Service.asmx"
SoapRequest="<?xml version=""1.0"" encoding=""utf-8""?>"&_
"<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://www.w3.org/2003/05/soap-envelope"">"&_
" <soap:Body>"&_
" <AandB xmlns=""HTTP://API.510769.COM"">"&_
" <a>1</a>"&_
" <b>2</b>"&_
" </AandB>"&_
" </soap:Body>"&_
"</soap:Envelope>"
Set xmlDOC =Server.CreateObject("MSXML.DOMDocument")
Set xmlhttp = server.CreateObject("Msxml2.XMLHTTP")
xmlhttp.Open "POST",url,False
xmlhttp.setRequestHeader "Content-Type", "text/xml;charset=utf-8"
xmlhttp.setRequestHeader "Content-Length",LEN(SoapRequest)
xmlhttp.setRequestHeader "SOAPAction", "HTTP://API.510769.COM/AandB"
xmlhttp.Send(SoapRequest)
bOK = xmlDOC.load(xmlhttp.responseXML)
xmlStr = xmlDOC.xml
Response.Write(bOK&xmlStr)
Set xmlhttp = Nothing
Set xmlDOC = Nothing
%>
xmlhttp.setRequestHeader "SOAPAction", "HTTP://API.510769.COM/AandB"这里出毛病了吧!
这个http://api.510769.com/Service.asmx才是你的实际路径吧!