Last post Feb 21, 2014 02:14 AM by Fuxiang Zhang - MSFT
Feb 20, 2014 08:04 AM|Taonias|LINK
I need to call a .net web service (wsSchedules.asmx) method called UpdateFields with no parameters from a batch file which will be executed according to a task schedule created in plesk.
Can anyone post an expample of how can I achive that?
Is it possible to test the batch file locally?
Feb 21, 2014 02:14 AM|Fuxiang Zhang - MSFT|LINK
Thank you post the issue to asp.net forum.
In my mind, I think we may not invoke a web service method directly from a batch file(.bat).
What we should do is that create a basic c# or VB application to invoke the web service and then use a batch file to invoke the created application.
There is a demo for calling a Web Service from a Command-Line with the VBScript.
Save the following as MSFT.vbs:
set SOAPClient = createobject("MSSOAP.SOAPClient")
WScript.Echo "MSFT = " & SOAPClient.GetQuote("MSFT")
Then from a command prompt, run: C:\>MSFT.vbs
For more information, you can refer to below blog.
Hope this helps, thanks.