Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Calling a web service from a script or batch file

We have a financial product that has built in scheduling capabilities to run over night batches. This product can also use web services to kick off each batch as required.

I want to know if it is possible to call the web services from a .bat file or another type of batch/script file. If this is possible then we can call the batch file from the companies scheduling service (Autosys).

I don't want to write a exe to call this if possible (circumstances outside my control).

KISS approach :)

like image 827
John'o Avatar asked Oct 01 '09 23:10

John'o


2 Answers

This is a take on John'o's answer that uses Microsoft.XmlHttp (which should already exist on the server\workstation)

Create a .vbs a

Set http = CreateObject("Microsoft.XmlHttp")
http.open "GET", "http://www.webservicex.net/stockquote.asmx?WSDL", FALSE
http.send ""
WScript.Echo http.responseText
like image 183
Sean M Avatar answered Sep 24 '22 14:09

Sean M


Hi All I found the answer if anyone else is looking to do the same thing. The following link has an example using a .vb script to call the WS.

http://blogs.msdn.com/bgroth/archive/2004/10/21/246155.aspx

like image 24
John'o Avatar answered Sep 26 '22 14:09

John'o