从批处理文件调用Web服务
问题描述:
我需要创建一个批处理文件,该文件将调用Web服务中包含的特定Web方法.
为此需要代码.
我怎么知道脚本已成功执行
I need to create a batch file that will call a particular web method contained in the webservice.
Need code for this.
How will i know that the script has successfully executed
答
将以下VBScript创建为WebCall.vbs
Create the following VBScript as WebCall.vbs
Set http = CreateObject("Microsoft.XmlHttp")
http.open "GET", "http://www.mywebservice.com/webmethod.asmx?WSDL", FALSE
http.send ""
WScript.Echo http.responseText
然后,在命令行提示符下以
方式运行脚本
Then, run the script at command line prompt as
C:\>WebCall.vbs