Web Services, as known as XML Web Services, are units of application logic that provide
data and services to other applications using Internet (or Intranet). Applications access
Web Services via different kinds of Web protocols and data formats such as XML, with no
need to worry about how Web Services are implemented. They can be implemented for any
operation system that supports communication over the Internet and Intranet. They are the
cornerstones of the Microsoft .NET programming model.
Web Services can be accessed by any language, using any component model, and running
on any operating system. They utilize HTTP as the underlying transport, which allows
function requests to pass through corporate firewalls. XML is used to format the input and
output parameters of the request, so the request is not tied to any particular component
technology or object calling convention. The Microsoft .NET Framework makes Web Services
easy to write components that communicate using HTTP and SOAP.
Web Services are similar to the regular services in our life. For example, if you
have a car that needs gasoline to run, you do not need to have your own gas pump at home.
All you need to do is drive to a nearby gas station, fill up the gas tank, and you are on
your way. You have received a service from the gas station, Web Services are like this as
well. Now, imagine that you are going to build a web site or a Internet system for you
company, you can use Web Services' "services" to get a complicated application. That
should lighten your work load.
Building Web Services
Before you start to create your Web Services, there are some of concepts you have to
know. The two most important things are the Simple Object Access Protocol (SOAP) and XML.
SOAP is a way for applications to communicate with one another over the Internet,
independent of platforms. Unlike Http-Get and Http-Post, only can send name/value, but
SOAP can send various rich data type, classes, objects, and others. XML is a pared-down
version of SGML, designed especially for Web documents. It allows designers to create
their own customized tags, enable the definitions, transmission, validation, and interpret
data between applications and between organizations. SOAP relies on XML.
Web Services relies on XML-formatted messages to send data and receive commands. Web
Services support three stardard protocols, Http-Get, Http-Post, and SOAP. In Web Services
, the Http protocol only can be use the simple data. We do not discuss it here. All Web
Services exmaples in this artical use SOAP communication.
Now let's explore how to build a Web Service at server. There are two ways to do
so. If your Web Service is quite simple, you can directly save it as a .asmx file, such as
TempConvertorCsharp.asmx. In some complicated applications, especially for database
related applications, I prefer to use components. For instance, The DB Query1/2-Web
Service at my .NET tutorial, I created the classes as component first, then created a
.asmx Web Service file that called the component (to create a component, see my .NET
tutorial for details.) The whole structure of the service is "UI-Component(Web Service
classes)-Database" known as 3-tier archecturre.
http://msdn2.microsoft.com/hi-in/webservices/Aa740691.aspx
Web services are a new breed of Web application. They are self-contained, self-describing, modular applications that can be published, located, and invoked across the Web. Web services perform functions, which can be anything from simple requests to complicated business processes...Once a Web service is deployed, other applications (and other Web services) can discover and invoke the deployed service.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment