我在以下链接有网络服务:http: //abc.com/asmx
我已使用以下代码向 webservice getcustomers 发出请求:
<%
DIM PostData, strStatus, strRetVal, postUrl
PostData = _
"<?xml version=""1.0"" encoding=""utf-8""?>" &_
"<soap:Envelope xmlns:env=""http://www.w3.org/2001/XMLSchema-instance"" &_
"xmlns:xsd='http://www.w3.org/2001/XMLSchema'" &_
"xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" &_
"<soap:Body>" &_
" <getCustomer xmlns=""http://3dcart.com/"">" &_
"<storeUrl>www.abc.stores.com/</storeUrl>" &_
"<userKey>sdfsf</userKey>" &_
"<batchSize>1</batchSize>" &_
"<startNum>1</startNum>" &_
"<customersFilter>firstname=John</customersFilter>"&_
"<callBackURL></callBackURL>"&_
"</getCustomer>"&_
"</soap:Body>" &_
"</soap:Envelope>"
response.write("req=" & Server.HTMLEncode(PostData) & "<br/>len=" & len(PostData))
postUrl = "http://abc.com/cart.asmx?op=getCustomer"
Set xmlHTTP = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlHTTP.open "POST", postUrl, false
xmlHTTP.setRequestHeader "Content-Type", "text/xml; charset=utf-8"
'xmlHTTP.setRequestHeader "SOAPAction", "http://AvailReceive/AvailRq"
xmlHTTP.send PostData
strStatus = xmlHTTP.Status
strRetval = xmlHTTP.responseText
set xmlHTTP = nothing
response.write("<br/>")
response.write("status=" & strStatus & "<br/>resp=" & strRetval)
%>
但我收到错误:resp=soap:ReceiverServer 无法处理请求。---> 'http' 是一个意外的标记。期待空白。第 1 行,位置 163。
你能告诉我为什么会出现这个错误,解决方法是什么。