|
XML Web Services
A Web Service (XML Web Service) is a unit of code that can
be activated using HTTP requests. Stated another way, a Web Service is an application
component that can be remotely callable using standard
Internet Protocols such as HTTP and XML. One more definition can be, a Web Service
is a programmable URL. Web Services came into existence
to deliver distributed computing over the Internet. A major advantage of the Web services
architecture is, it allows programs written in different languages on different platforms
to communicate with each other in a standards-based way.
Simply said, a Web service is a software service exposed
on the Web through SOAP, described with a WSDL file
and registered in UDDI.
Why XML Web Services?
Today, available technologies like Component Object Model (COM), Remote
Method Invocation (RMI), Common Object Request Broker Architecture (CORBA)
and Internet Inter-ORB Protocol (IIOP) are used to package
application logic into reusable components and are called remotely across multiple
platforms. The Internet today consists of tremendous number of heterogeneous systems
and a key limitation of all the above said technologies is they are not easily interoperable
with these different systems and that limits their effectiveness as a standard method
for programming the Web. This is because of the dependencies of these technologies
on a particular language or a particular Operating System or Object-model specific
protocols. Web Services on the other hand are very different when compared to the
said technologies as they are built upon widely accepted standards that can interoperate
easily on the Internet. A key to the success of Web Services is that they use a text-based
messaging model to communicate which allows them to operate effectively on
different platforms.
Example of a Web Service
There is already an example in the ".NET Defined" VB.NET section
of this Web site. Here is another example similar to that. Consider a commerce site
that allows consumers to shop online. After all the shopping has been done this site
calculates all the charges and the shipping costs based on a variety of shipping options.
This site will have alliances with different shipping companies to ship the products
to it's consumers. This site might maintain a set of database tables that describe
the shipping options and costs for each shipping company based on their location and
services. With this approach, whenever there is a change in shipping options or costs
of an existing shipping company change or if a new shipping company forms an alliance
with this commerce site and provides it's services the Webmaster of the commerce site
has to restructure the database and update them to fit the changes. This approach
is not only time consuming but also requires the commerce site to invest extra IT
costs to maintain it's database. Now, imagine this commerce site programmatically
calling a Web Service on it's site provided by the shipping company. What happens
with this approach is, the commerce site can calculate shipping costs based on the
shipping option that a consumer specifies in his request and returns the costs in
real time. This approach eliminates the need for the commerce site to maintain a separate
database table for shipping companies and also all the shipping costs are calculated
on the shipping company site and returned to the commerce site in real time.
Some other applications of Web Services are:
-
Information sources like stock quotes, weather forecasts, sports scores etc that could
easily incorporate into applications
-
Services that provide commonly needed functionality for other services. Example, user
authentication, usage billing etc
-
Services that integrate a business system with other partners
The image below shows Web Services Architecture.
Foundational elements of Web Services
The .NET Framework provides an excellent foundation for building and consuming Web
Services. A key to the broad-reach capabilities of these Web Services is a foundation
built on Internet Standards that does not rely on any platform, protocol or OS. This
foundation provides the following capabilities to Web Services:
-
A standard method for describing data
-
A standard message format for communicating request and response
-
A standard method for describing the capabilities of Web Services
-
A method to discover what Web Services are available at any site
-
A method to describe what sites provide Web Services
|