asp调用 web service
这是我的源码
Set objHTTP = Server.CreateObject("MSXML2.XMLHTTP")
Set xmlDOC =Server.CreateObject("Microsoft.XMLDOM")
strWebserviceURL = "http://webserver.wzilin.com/webserver/WS_BIG5/qq.asmx?op=CHINA_Weather"
'设置参数及其值
strRequest = "x="&request.Form("a")&"&y="&request.Form("b")
objHTTP.Open "POST", strWebserviceURL, False
objHTTP.SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
objHTTP.Send(strRequest)
bOK = xmlDOC.load(objHTTP.responseXML)
'看看状态值
if objHTTP.Status=200 then
Set docXSL = server.CreateObject("Microsoft.XMLDOM")
docXSL.async = False
docXSL.load(server.MapPath("test1.xsl"))
'response.write docXSL.xml
Set docTran = server.CreateObject("Microsoft.XMLDOM")
xmlDOC.transformNodeToObject docXSL,docTran
'response.write docTran.xml
xmlStr = docTran.xml
xmlStr = Replace(xmlStr,"<","<",1,-1,1)
xmlStr = Replace(xmlStr,">",">",1,-1,1)
response.write xmlStr
end if
报错:Server.CreateObject 失败
无效的 ProgID。 若要获取关于此消息的更多的信息,请访问 Microsoft 联机支持站点: http://www.microsoft.com/contentredirect.asp 。
我不知道用asp怎么去调用wen service这个是我在网上找的例子.
请教各位大侠我要怎么才能把天气预报这个web service的内容取出来啊.提供代码给我学习吧.