我是编码的初学者。
我必须调用下面的网络服务: http ://www.w3schools.com/webservices/tempconvert.asmx?op=CelsiusToFahrenheit
输入像 25 这样的值,然后单击 Invoke 会返回华氏温度。
为此,我使用了以下代码:
url = "http://www.w3schools.com/webservices/tempconvert.asmx?op=CelsiusToFahrenheit&Celsius=25"
'Set oHttpReq = CreateObject("Microsoft.XMLHTTP") 'when i use XMLHTTP i am getting error saying "The download of the specified resource has failed."
Set oHttpReq = CreateObject("MSXML2.ServerXMLHTTP") 'If i use it, the response contains Root Element missing
oHttpReq.open "POST", url, False
oHttpReq.send
'Response
responseText = oHttpReq.responseText
WScript.echo responseText
谁能帮我?