The Foundations of Web Services: From Novice to Expert
A web service is a way to make applications inter-operate across different programming languages, platforms and operating systems in order to share the data quickly and efficiently. In this series of articles, I will take you through the basic to advanced concepts for this subject. We will work together on technical aspects of web services for building, deploying, finding and debugging web services.
The Foundations of Web Services: From Novice to Expert - Web service capabilities (Page 4 of 4 )
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.
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.