Chapter 15. Web Services OverviewThe World Wide Web has opened up distributed computing on a large scale. However, normal web pages only allow interaction between the client browser and the web server hosting the web page. The goal of web services is to create web-based applications that interact with other applications with no user interface. If you're a web page developer, having such web services available can greatly increase your productivity. Imagine, for instance, you are creating a web site for a stock brokerage firm. Rather than having to integrate your back-end database with all the various databases of the different stock exchanges, your application can simply communicate with their web services, exchanging data in XML format. Web services are similar to web pages. The principal difference is that a web page is intended for viewing by a person, while a web service is used strictly for one program to interact with another and has no user interface. Web services are entirely independent of the operating system or programming language used on either the server or the client side. Unlike previous technologies for distributed computing (such as DCOM), web services make it unnecessary for either end of the connection to be running the same operating system or to be programmed in the same language. For example, the server code might be written in VB.NET on Windows 2000 while the client is C++ running on a Unix machine, or vice versa. In other words, while previous technologies required that the client and server be tightly coupled, web services permit the client and server to be loosely coupled. All that is necessary is that both server and client support the industry standard protocols HTTP, SOAP, and XML. HTTP is the protocol used by the Web. SOAP (Simple Object Access Protocol) is a lightweight, object-oriented protocol based on XML, which in turn is a cross-platform standard for formatting and organizing information. This chapter provides a high-level view of what web services are and how they work. It describes, briefly, the standard protocols that make web services possible, as well as introducing how web services are created and consumed. Chapter 16 covers in detail what is actually involved in creating web services. Through the development of a simple stock ticker, it demonstrates how to create a web service using either a text editor or Visual Studio .NET. It also shows you how to create a discovery file and how to deploy the web service. Chapter 17 looks at web services from the other side of the fence, i.e., from the consumer's point of view. This chapter builds on the stock ticker web service created in Chapter 16 to create a client web application that consumes, or uses, the stock ticker web service. Again, we demonstrate doing this using both a text editor and Visual Studio .NET. |