我在下面的鏈接web服務: http://abc.com/asmx化妝請求通過SOAP的web服務,並得到響應傳統的ASP
我已經提出的要求使用web服務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.
你能告訴我爲什麼我得到這個錯誤是什麼解決它。
同樣的問題在五個小時內三次? – BradBrening 2012-04-25 13:04:37
反覆提問就像是反覆要求降低價格,不是嗎?請只提問一次。 – halfer 2012-04-25 22:41:49