我从excel vba代码编辑器中收到此运行时错误2147483638。我尝试发送到我的Web服务xml字符串并从Web服务获取响应。似乎错误了,因为响应是""。这是我的代码:
......
OutboundDocument.LoadXML (XMLServiceString)
On Error GoTo DoThisAgain
XMLHTTPClient.Open "POST", WebServiceURL, False
XMLHTTPClient.Send (OutboundDocument)
'errors out here
DoThisAgain:
serviceResponse = XMLHTTPClient.ResponseText ' equals "" gets error
答案 0 :(得分:0)
这可以避免错误:
Dim MyRequest As MSXML2.XMLHTTP
Set MyRequest = CreateObject("MSXML2.XMLHTTP.6.0")
With MyRequest
.Open "GET", <URL>
.send ""
MyResponse = MyRequest.responseText
End With