Introduction to Web Services
With all this sudden awareness about the terms Web Services and ebXML, everyone is bound to get curious and want to know what all this noise is about. Well, we hope that this series of articles, starting from today, and appearing once every fortnight, should clear the curious minds, and put you on a strong footing to tackle the mysterious Web Services with great ease and understanding.
In our articles, we are going to focus primarily on the "internals" of Web Services. We will discuss what actually goes on behind the scenes, how you can build on your existing knowledge and skills, and similar topics. The main idea of this series of articles is not to make you feel as though you are learning a whole new technology altogether, but to realize that this new innovation is reusing existing knowledge to create a more capable and robust system in the Web World.
These articles expect the readers to have basic knowledge of server-side Java or Microsoft technologies. We shall start with the history behind Web Services, then move on to understanding some basics of Web Services, and later on, discuss the different components of Web Services in detail. Next, we will explore ebXML, and finally, how to program Web Services applications on the J2EE and .NET platforms. Because all these are based on XML, we shall have a section briefly explaining XML, so that your XML concepts are clear before we proceed with learning Web Services.
The Advent of Web Services
In today's world of extreme competition on the business front, information exchange and efficient communication is the need of the day. Information Technology has grown by leaps and bounds, and sustained, not because it seems savvy, but because businesses can function more efficiently. This need for information exchange brings in another need to make this information selectively visible, and its visibility to be changed on the fly.
For example, with the introduction of the telephone came the need to have a directory service. This gave rise to the ever-popular "Yellow Pages," which brought the consumer and the provider closer to each other.
The revolution of computerizing services of companies gave rise to isolated computer systems. Each company had software developed and customized to its specific needs. However, mergers, acquisitions, and business growths saw the need to share information stored in these isolated computer systems. The Internet did solve this problem to some extent. However, the Internet also opened many loopholes in security, making the owners of this information uneasy about the scope of their information's availability.
Hence, it became imperative that, for better B2B (Business-to-Business) communication, these systems must have the ability to link up to each other, grant permissions through a system other than the Internet, and which would make all the systems network with each other like an Intranet.
Problem Space Addressed by Web Services
Web Services is probably not the first solution to such a problem. RMI, COM, CORBA, EDI, and ebXML also address the same problem space. So, what would make Web Services so special and different from the rest?
Web Services is based on the already existing and well-known HTTP protocol, and uses XML as the base language. This makes it a very developer-friendly service system. However, most of the above-mentioned technologies such as RMI, COM, and CORBA involve a whole learning curve. New technologies and languages have to be learnt to implement these services.
Also, Web Services is based on a set of standardized rules and specifications, making it more portable. This was not the case with the technologies mentioned earlier.
Component Technologies of Web Services
Consider a scenario in which you need to locate a particular pharmacy store in your area. You would not go out on the road and ask every person you met the way to the store. You might, instead, refer the Web site of the pharmacy on the Internet. If you knew the pharmacy's Web site, you would look it up directly and find the location through the store locator link. If not, you would go to a search engine and type out the name of the pharmacy in the language that the search engine was meant to recognize. After getting the location, you would find the directions to the store, and then go to the store.
The structure of Web Services is also very similar. Web Services provide for each of these previously described activities.
If you carefully look at the preceding example, you will see that there is a requestor or a consumer—that is you. There is also a service, the pharmacy store. The central database of information is the Internet, through which you find the location of the pharmacy. In the example, when you fire a search in the search engine, your request is wrapped in a structure, whose language is predetermined and localized, and then passed onto the server running the search engine.
In Web Services, SOAP, UDDI, and WSDL represent the roles mentioned in these steps.
SOAP (Simple Object Access Protocol) is the method by which you can send messages across different modules. This is similar to how you communicate with the search engine that contains an index with the Web sites registered in the index associated with the keywords.
UDDI (Universal Description, Discovery, and Integration) is the global look up base for locating the services. In the example mentioned earlier, this is analogous to the index service for the search engine, in which all the Web sites register themselves associated with their keywords. It maintains a record of all the pharmacy store locations throughout the country.
WSDL (Web Services Definition Language) is the method through which different services are described in the UDDI. This maps to the actual search engine in our example.
Figure 1.1 illustrates this concept.
Imagine if you had to maintain a copy of such information for each and every service available in your vicinity! With every change in your residence or your requirement, you would need to compile a new list. The preceding example is a very simplified form of the Web Services environment. But, don't get fooled by this. The scope of Web Services is not limited to just a lookup service. So, how does Web Services become important for the business world?
Business Aspects of Web Services
Web Services in the business world, in the most simplistic fashion, provides a mechanism of communication between two remote systems, connected through the network of the Web Services. For example, in case of a merger or an acquisition, companies don't have to invest large sums of money developing software to bring the systems of the different companies together. By extending the business applications as Web Services, the information systems of different companies can be linked. These business systems then can be accessed by using simple SOAP messages over the normal HTTP Web protocol. For example, a manufacturing company requires some raw materials to be supplied whenever the material in stock reaches the threshold levels. These levels can be constantly monitored by the business system of a trusted supplier, and promptly replenished, without having to wait for a supervisor to notice it and generate a work order.
There are many more important uses of Web Services. These, again, depend on the requirement of your company. Interested enough to find out more? In our next article, you will learn about the architecture of Web Services, the technology organization, the protocols used, and the basic steps involved in building a Web Services application.
About the Author
Lakshmi Ananthamurthy is presently working with Accenture. She is a consultant who has designed, developed, and implemented n-tier Web applications for 5 years, for clients including MBNA, MCI Worldcom, British Telecom, and Mahindra British Telecom. She has extensive hands-on experience designing and developing J2EE, Java, ASP, XML and Oracle based applications, using different application servers and also has expertise in object and database modeling.
|Access our Web Services Glossary|