Web Services are ASP.NET programmable entities that provide particular functionality and are accessible to any other systems through the use of the Simple Object Access Protocol (SOAP), a technology that uses Internet standard XML and HTTP. Web Services are based on the XML standard and other Internet standards in order to provide an interface that is usable not only by other .NET applications but also applications written in other languages and on other platforms.
A Web Service can either be used internally by a single application or exposed to be used externally over the Internet. By using an XML-based protocol as the fundamental communication method, the technology gap between systems is eliminated. Developers can create applications that use many different Web Services together, similar to using objects together.
One of the main characteristics of a Web Service is its high level of abstraction. The implementation and usage of the Web Service is done through an XML-based protocol. Therefore, the client and server need only deal with that technology and understand the inputs, outputs, and location provided by the Web Service.
Web Services that reside on a Web server are addressed via URLs. Clients of Web Services can discover what Web Services are available, dynamically discover their interfaces, and then use the Web Services, all without being specifically programmed to work with those Web Services.
Essentially a Web Service has the same generic capabilities that a Web browser has with a Web site. The Web browser isn't developed to use a specific Web site, but when it is pointed to one, it knows how to adapt to the content and display it appropriately. A Web Service is similar in that the client does not have to be programmed to know everything about a Web Service. Instead, the client discovers the Web Service's interface and then uses it appropriately.
Web Services must be loosely coupled, use an open standard for communication, and use a universal data format. Rather than using a binary protocol to send and receive data, Web Services uses text-based XML, which in turn leads to several advantages. First of all, it is much easier to debug by reading XML than it is to parse through chunks of binary data. Secondly, by using standard technologies, namely HTTP and XML, third-party vendors can easily create their own implementations for different platforms. Web Services also use an infrastructure that provides a discovery mechanism, a service description to describe how the services should be used, and a standard format with which to communicate. Figure 11.1 shows a representation of the Web Service infrastructure.