Click here to Skip to main content
15,905,068 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Posted
Updated 9-Oct-11 20:01pm
v3

1 solution

Create the following VBScript as WebCall.vbs

JavaScript
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
 
Share this answer
 
Comments
Joseph Rego 10-Oct-11 1:56am    
on executing Webcall.vbs it opens the script.I have put a debugger point on the web method(inside the webservice) that needs to be called ,but it does not get hit.
can this vb script be placed inside a folder of my choice and then navigate to that folder in command prompt and call the script?
Joseph Rego 10-Oct-11 1:57am    
I want only a particular web method to be called,how can that be done?
ashishdhingra 30-Jan-14 2:02am    
Here is an example to call method GetQuote
set SOAPClient = createobject("MSSOAP.SOAPClient")
SOAPClient.mssoapinit "http://www.webservicex.net/stockquote.asmx?WSDL"
WScript.Echo "MSFT = " & SOAPClient.GetQuote("MSFT")

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900