[Home]|[Resources]|[Web Services]
Web Services Overview
Web Services is a term that refers to implementing SOAP over HTTP to expose remote APIs to the internet. Using them from the client side is easy. You can easily generate a class using a WSDL file and use that as if the remote service were local. The class then bundles everything up in nice SOAP envelopes and sends it off to the server.
The server side is much more difficult. A server is theoretically supposed to be able to handle a whole bunch of HTTP requests at once, keep track of where they're coming from, make the appropriate procedure calls, and return the correct data to the correct client. Essentially, a full scale server is needed. Generally, SOAP is used to provide services through a web server, so you can easily use IIS to handle all the server stuff and just implement a nice little SOAP interface on top of that. This is what .NET assumes you are going to do. A person can create an ASMX file, which is a web service file, and expose functions to the world. IIS then does all sorts of stuff in the background to make it work well, including create a page that allows you to see the interface through a web browser.
The problem comes in when a person wants to use web services for an average desktop application, as we want to do. We can't possibly ask the user to always be running an instance of IIS in the background! The alternative appears to be writing our own server and dealing with all the XML, SOAP, and server stuff that comes with that. Fortunately, this isn't the case. It turns out that there are already web servers implemented in the .NET framework. We can essentially embed a small web server into our server and use it to serve up asmx files that expose the functions we want to expose. These functions can then easily (and securely) access the rest of the application without us having to worry about how to write a web server. There is a good article with example code linked below.
I have yet to get this example code to work with Mono.
http://msdn.microsoft.com/msdnmag/issues/04/12/ServiceStation/#S4
