日期:2014-05-16 浏览次数:20957 次
Set xmldoc = server.createObject("Msxml2.DOMDocument")
xmldoc.async = false
Set soapclient = server.CreateObject("MSSOAP.SoapClient30")
soapclient.ClientProperty("ServerHTTPRequest") = True
soapclient.mssoapinit "http://220.250.64.122/UIP/services/MgPUBTicketRetireService?wsdl","http://schemas.xmlsoap.org/soap/http","",""
str = soapclient.retireTicket(retireTicket)
response.Write str
url = "http://220.250.64.122/UIP/services/MgPUBTicketRetireService?wsdl"
Set xmlhttp = server.CreateObject("Msxml2.XMLHTTP")
xmlhttp.Open "GET",url,false
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"'注意
xmlhttp.setRequestHeader "HOST","220.250.64.122"
xmlhttp.setRequestHeader "Content-Length",LEN(url)
xmlhttp.Send(url)
'这样就利用XMLHTTP成功发送了与HTTP POST示例所符的POST请求.
'检测一下是否成功:
If xmlhttp.Status = 200 Then '调用成功
Set xmlDOC = server.CreateObject("MSXML.DOMDocument")
xmlDOC.load(xmlhttp.responseXML)'使用xml文档的格式
response.Write xmlDOC.childNodes(1).Text
Set xmlDOC=nothing
Else
Response.Write xmlhttp.Status&" "
Response.Write xmlhttp.StatusText
End if