Web Service Plugin

This plugin allows web services to be consumed from within LCD Smartie.  Currently only web services that permit HTTP GET methods are supported.  It features caching to avoid repeated calls to the web service, which are typically unnecessary.
 

Requirements

This plugin is written in C# and requires the Microsoft .NET framework 2.0.  You can download it from here.
 

Usage

The first step to adding a web service to LCD Smartie, is to add a section to the configuration file.  You need to specify the URI of the web service, the web service method and finally the amount of time in minutes you want the results cached.  An example WEBSVC.ini file is below:

[Service 02]
URI=http://ws.invesbot.com/stockquotes.asmx
Operation=GetQuote
MinsInCache=30

After you have defined that, you can then go into LCD Smartie to specify the request.  The format is $dll(WEBSVC,x,y,z), where x is the function number (up to 20), y is the web service parameters (name/value pairs separated by & character) and z is the XPath expression.

To determine the XPath string to use in the request, you can use the freeware Buba XPath Builder which can be downloaded here.  An example web service request is below:

$dll(WEBSVC,2,symbol=MSFT,/StockQuote/Open)

To see the XML that is returned from the web service, you can put the request into a browser, like the following example:

http://ws.invesbot.com/stockquotes.asmx/GetQuote?symbol=MSFT

Since the XML result is cached, you can make several calls to the same web service with different XPath expressions to retrieve different elements or attributes in the XML.
 

Download

The plugin can be downloaded from here.  It includes full source code and an example configuration file.  Put the WEBSVC.dll and WEBSVC.ini files into the LCD Smartie plugins directory.
 

Feedback

Please feel free to offer any feedback or post a web service that you have used successfully and would like to share.  Click here to send feedback.
 

Services

Below are some free web services that can be used from within LCD Smartie, please contribute any that you have discovered.

Service Type URI Example
Weather Information http://www.innergears.com/WebServices/WeatherByZip/ WeatherByZip.asmx/GetWeatherByZip?ZipCode=10024 $dll(WEBSVC, 1, ZipCode=10024, /def:ArrayOfString/def:string[15])
Stock Quotes http://ws.invesbot.com/stockquotes.asmx/GetQuote?symbol=MSFT $dll(WEBSVC, 2, symbol=MSFT, /StockQuote/Open)
Random Quotations http://www.swanandmokashi.com/HomePage/ WebServices/QuoteOfTheDay.asmx/GetQuote $dll(WEBSVC, 3, , /def:Quotes/def:QuoteOfTheDay)