Dynamic Link Web Libraries

Dynamic Link Web Libraries

Nobody invented Web services (at least not within the past two years), but all the main players in the Information Technology (IT) arena are rapidly adopting and transforming the idea of “software callable by other software” into solutions that fit all development platforms.

No matter how a Web service is created, by which vendor or platform, the way it is exposed to the public is standard. Any Web service can be imported and incorporated into a vendor-specific or platform-specific solution, as long as it adheres to accepted standards. Web services guarantee interoperability because they are based entirely on open standards. By rolling functionality into a Web service, you can expose it to any application on the Web that speaks HTTP and understands XML. Of course, some infrastructure that deals with Web communication and data transportation is required. No worries, though—the major IT players are building this infrastructure into their development platforms.

An emerging view of Web services regards them as Web libraries of functions. Just as Microsoft Windows Dynamic Link Libraries (DLLs) are shared pieces of code from which processes can import common functionalities, Web services are platform-independent, URL-accessible, dynamic link collections of functions.

Compared with DLL functions or COM objects, Web services are a very special breed of service-oriented systems. They do not require custom protocols for communication. For example, a COM client must use COM protocols to speak to a COM service. You can see that COM is not as pervasive on the Web as Web services, and it also suffers from firewalls that might routinely block communication on certain ports. Web services based on open standards such as HTTP and XML are the leading technology for system interoperation.

Web Service Specifications

A Web service has three important characteristics. First and foremost, a Web service is accessible over the Web by using a URL. If needed, its public set of functionalities can be protected in some way from unauthorized use through common programming techniques, including authentication and user profiling.

Second, Web services communicate with the outside world by using XML messages sent over standard Web protocols. HTTP is by far the primary transportation protocol, but others can be used as well—for example, asynchronous protocols such as SMTP and even MSMQ. As you learned in Chapter 8, SOAP is the XML-based protocol used to package the messages exchanged between the service and the user. The XML schemas technology also plays a key role because it provides the underlying type system for SOAP to build its own model of data.

Third, a Web service is registered on a public registry and, most important of all, has its descriptive information published in a standard way so that potential clients can discover it and instantly know how to access the methods.

Underlying Technologies

A variety of technologies cooperate to support the infrastructure for Web services. All are open technologies that either are already recommended by the W3C or are maturing quickly and, as such, are commonly perceived as de facto standards. A Web service communicates by exchanging XML packets over standard Internet protocols such as HTTP. The Web service back-end contains the code that produces and consumes such messages, which are mostly written according to the SOAP specification.

A Web service can be exposed through a global registry of applications. In this sort of Web yellow pages, companies provide both contact information and product and service information. Buyers are free to search the registry and locate companies that provide the services they need. The organization named Universal Description, Discovery, and Integration (UDDI) defines the specification and the rules that govern this process.

Web service discovery is the process of locating XML documents that describe the functionality of a particular Web service. Through the discovery process, a potential client learns that a Web service exists and where to find more information about it. The list of functions is supplied through the Web Services Description Language (WSDL).

The outermost envelope that wraps Web services is fully open and based on widely accepted standards, but the features of the underlying platform really make Web services run. Let’s learn more about writing and invoking Web services in .NET. For more about Web services, you might also want to check out Building XML Web Services for the Microsoft .NET Platform, by Scott Short (Microsoft Press, 2002).