For all you command-line freaks out there, I hope you know about Microsoft’s scripting technologies. Hopefully you are also aware that web services is the hot new thing and is certainly a great way to architect solutions these days. So, combining those two things (WS+Script), here is how to call a web service from a command-line via script:
Save the following as MSFT.vbs:
set SOAPClient = createobject(“MSSOAP.SOAPClient”)
WScript.Echo “MSFT = ” & SOAPClient.GetQuote(“MSFT”)
Then from a command prompt, run:
After a few seconds, (it has to hit the web server, which gets the data, then sends it back to you) a text box will pop up with the XML that is returned from the web service, which in this case, tells you the current stock information for Microsoft.
Thanks to http://www.webservicex.net for making the web service available.
Thanks to http://groups.msn.com/windowsscript/windowsxp.msnw for giving the example (with a web service that no longer existed, so my example is sort of an update to that one)
Find a TON of very cool scripts on the TechNet Script Center.
I’m sure someone out there can come up with a useful example based on this idea. Want to give me some of those ideas? Better yet, want to write some and share them with me?