by kirupa |
11 August 2006
Web services provide a common interface for communicating and exchanging data
with different systems. That sentence sounds pretty generic and doesn't really
help you understand what web services are. Instead, I think the following
diagram provides a better idea of what web services are:
So you have this Web Application, and you really want to use your current
Applications to communicate with it. Unfortunately, your Applications don't have
any idea on how to communicate with the Web Application, but all hope is not
lost! Your applications implement a mediator - a Web Service - to convert the
requests your applications make into a form that is recognized by the Web
Application.
In other words, a web service allows your applications to
communicate with whatever is hiding out back. It does not
matter what language the applications are coded in, what type of server your Web
Application is running on, etc. As long as both the Web Application and your
Applications have a common language with which to communicate with the Web
Service, then you are good to go! To copy and paste my intro sentence, web
services provide a common interface for communicating and exchanging data with
different systems.
Now that you have a brief, though possibly twisted view of what Web Services do,
let's go about creating one in ASP.NET. Our Web Service will be fairly simple,
for I really want this tutorial to be more about how to create a web service
using Visual Web Developer/Visual Studio 2005 instead of focusing on the
semantics of the C# language.
On the next four pages, I will explain how to create your web service using
Visual Studio 2005/Visual Web Developer, and then conclude by explaining how the
web service works along with a line-by-line explanation of the code.
Onwards to the
next page.
|