You are on page 1of 4

The Foundations of Web Services: From

Novice to Expert - Understanding web


services

Web services are made to deliver distributed applications on the web via programmable
components.

There are many potential applications where web services are extremely useful. These
include services which are too difficult/expensive to implement, such as
maintaining stock quotes, credit card validation, location mapping, and so on.

Services which enable one machine to invoke some functionality or to retrieve


some data from a remote machine are called web services.

Web services are lightweight, stateless, platform neutral and adhere to the
standard techniques.

Web services can be programmed in two ways to meet with the basic requirements of
web service consumers and web service providers.

Web service consumers invoke/seek data from the remote server.

Web service providers provide the generalized functionality to fetch the data
to consumers and are continuously waiting for a request.

Benefits of web services

1. Web services provide great inter-operating capabilities. For example, web


services created in Java can be consumed in .NET or vice versa.
2. Web services support leveraging the services of remote applications to
exchange data.
3. Web services provide a platform-neutral/platform Independent Interface.
4. Reduces the execution time and provides the reusability of the complex coding.
5. Reduces the cost of the application.

Ideally web services are useful for encapsulating complex applications and business
logic in a platform-independent interface so that other applications from different
platforms can utilize the same functionality without much digging.

How does message exchange occur for web services?

Web services deliver information in the form of Request and Response messages.
These messages can be written in a standard language with a standard format. They
traverse the network via any network transmission protocol.

The real internal technical issues about web services start now!

Basically, the messages used for web services are formatted in a standard format called
SOAP (Simple Object Access Protocol). Keep in mind that this is a messaging
format protocol and not the transmission protocol.

The message format implemented in SOAP is based upon XML. The use of XML as the
basis for formatting the SOAP messages enables the messages to be understood by any
system on any platform on the Internet. Thus, it is possible to transmit the SOAP
message via HTTP, HTTPS, FTP or any other transmission protocol.

When the consumer does not exactly know that what the web service will respond on
any request, it is not worthwhile to use that web service for any consumer. Thus, the
web service provider/author provides a document that describes the web service's
capabilities to its consumers.

A web services description is an XML document which is written in WSDL (Web


Service Description Language). It describes the capabilities of web services and
provides information to consumers on how to use a particular web service.

A WSDL document contains the message format, message exchange pattern, each web
service entry point, and more information which is helpful to the consumer for utilizing
the web service to achieve the desired result.

When consumer understands the use of WSDL, the next question that comes up is how
to locate WSDL on the server. The web services provider/author uses a DISCO
(Discovery) document to publish the web service on the server. It is an XML document
which contains the reference/pointer to WSDL for the web service. The DISCO
document provides the ability to programmatically discover information about the web
service.

Now, the web service consumer uses the discovery process by providing the web server
URL to the discovery tool. This tool attempts to locate the DISCO document on the
provided server and provides information about the available WSDL to the consumer.
Thus, the DISCO document and Discovery Tool enable the consumer to locate the web
service.
The good thing about the Microsoft .NET framework is that it provides you with such a
Discovery Tool, which is called Disco.exe.

Visual Studio.NET also provides built-in support for web service discovery via Web
Reference. I will cover this in detail in the next part of this series.

What is UDDI?

You use a search engine to search any web page related to your required information.
Can you imagine getting to a web page with information you require without using a
search engine on the web? Surely, with billions of web pages in existence, it would
be unrealistic.

In the same manner, there are many web services available on the Internet and the
number is still increasing. In such a scenario, finding a web service without any
concrete help is simply unrealistic.

UDDI is the website/web service which helps you locate web services. "UDDI" stands
for Universal, Description, Discovery and Integration specification/protocol. It provides
the registry and API to find web services. UDDI provides mainly two
things: registration of your own web services if you are a web service provider, and help
with finding the potential partner/web service to use with your application. .NET has
built in support for UDDI by Web Reference. You can get more details about UDDI
from its official web site: http://www.uddi.org/

So, the foundations of web services are XML, SOAP, WSDL, DISCO and UDDI. Now
we come to the matter of web service implementation, particularly in the .NET
Framework with Visual Studio. In the next few parts of this series of articles, you will
learn the same in much detail with practical examples and code.

I have not touched on XML because understanding XML is beyond the scope of this
series of articles. I would surely recommend that you understand a few
additional terms to gain better insight into web services; these are XML, XML
Namespace, XSLT, XSD, XPATH and XQUERY.

Recommended Reading for XML and Web Services

http://www.xml.com/

http://w3schools.com/xml/default.asp

www.xml.org

http://www.microsoft.com/net/basics/webservicesoverview.asp -->Flash Intro of "Web


Services in Action"

DISCLAIMER: The content provided in this article is not warranted or guaranteed by


Developer Shed, Inc. The content provided is intended for entertainment and/or
educational purposes in order to introduce to the reader key ideas, concepts, and/or
product reviews. As such it is incumbent upon the reader to employ real-world tactics for
security and implementation of best practices. We are not liable for any negative
consequences that may result from implementing any information covered in our articles
or tutorials. If this is a hardware review, it is not recommended to open and/or modify
your hardware.

You might also like