1.1. What Are Web Services?

At this point, you might be wondering exactly what Web services are and, more importantly, why your enterprise should consider making some of its own functionality available as a Web service. There are numerous definitions given for Web services, ranging from the highly technical ones to simplistic. For example, the World Wide Web Consortium (W3C) organization, which establishes the standards for Web services, defines them as follows: “A Web service is a software system identified by a URI whose public interfaces and bindings are defined and described using XML. Its definition can be discovered by other software systems. These systems may then interact with the Web service in a manner prescribed by its definition, using XML-based messages conveyed by Internet protocols.” A simpler definition, and perhaps more useful, might be: “a Web service is a software application, accessible on the Web (or an enterprise's intranet) through a URL, that is accessed by clients using XML-based protocols, such as Simple Object Access Protocol (SOAP) sent over accepted Internet protocols, such as HTTP. Clients access a Web service application through its interfaces and bindings, which are defined using XML artifacts, such as a Web Services Definition Language (WSDL) file.”

Web services are a result of the natural evolution of the Web. Initially, the Web consisted of sites that were plain HTML pages. Later, Web applications dynamically generated these same HTML pages. For example, a map Web site initially provided only static links to maps of various cities and locales. Later, this same map Web site became a map Web application that provided driving directions, customized maps, and so forth. Despite their expanded capabilities, Web applications are still limited to the restricted GUI capabilities of their HTML pages—a Web application is usable only through the limited GUI bound to the HTML pages. Web services go beyond this limitation, since they separate the Web site or application (the service) from its HTML GUI. Instead, the service is represented in XML and available via the Web as XML. As a result, the same map Web site can extend its functionality to provide a Web service that other enterprises can use to provide directions to their own office locations, integrate with global position systems, and so forth.

Web services, or simply services, build on knowledge gained from more mature distributed computing environments (such as CORBA and Java Remote Method Invocation) to enable application-to-application communication and interoperability. Web services provide a standardized way for applications to expose their functionality over the Web or communicate with other applications over a network, regardless of the application's implementation, programming language, or computer platform.

Why should an enterprise consider implementing Web services-based applications? Web services can provide a means for an enterprise to expand its business offerings, increase the efficiency of its business processing, and to improve its customer experience. By including with its own services the offerings of multiple partners, both the enterprise and the partners expand their capabilities and their business base. Not only can Web services help automate business processing, it can streamline interactions with outside services, such as credit card and shipping services. As a result, customers are offered an enriched experience: more options and greater choices, along with more flexibility.

Like any application, Web services-based applications can perform a range of functions. Some may handle only simple requests for information, while others may implement complex business processes and interactions. Whereas browser-based applications are concerned with the representation of data to end users, Web services let clients programmatically not only use the Web to obtain information but also to access these service components and their functionality. Furthermore, applications can incorporate Web service functionality for their own use.

Perhaps the most important reason for the increased use of Web services—the main force for their widespread adoption—is that Web services promote interoperability across different platforms, systems, and languages.

Use of Web services is also increasing because it reduces operational costs by enabling organizations to extend and reuse their existing system functionality.

A Web service enables a service-oriented architecture, which is an architectural style that promotes software reusability by creating reusable services. Traditional object-oriented architectures promote reusability by reusing classes or objects. However, objects are often too fine grained for effective reuse. Hence, component-oriented architectures emerged that use software components as reusable entities. These components consist of a set of related classes, their resources, and configuration information. Component-oriented architectures remain a powerful way to design software systems; however, they do not address the additional issues arising from current day enterprise environments. Today, enterprise environments are quite complex due to the use of a variety of software and hardware platforms, Internet-based distributed communication, enterprise application integration, and so on. The service-oriented architectures address these issues by using a service as a reusable entity. The services are typically coarser grained than components, and they focus on the functionality provided by their interfaces. These services communicate with each other and with end-user clients through well-defined and well-known interfaces. The communication can range from a simple passing of messages between the services to a complex scenario where a set of services together coordinate with each other to achieve a common goal. These architectures allow clients, over the network, to invoke a Web service's functionality through the service's exposed interfaces.

In a service-oriented architecture, you have the following:

  • A service that implements the business logic and exposes this business logic through well-defined interfaces.

  • A registry where the service publishes its interfaces to enable clients to discover the service.

  • Clients (including clients that may be services themselves) who discover the service using the registries and access the service directly through the exposed interfaces.

An important advantage of a service-oriented architecture is that it enables development of loosely-coupled applications that can be distributed and are accessible across a network. To enable this architecture, you need the following:

  • A mechanism that enables clients to access a service and registry.

  • A mechanism to enable different services to register their existence with a registry and a way for clients to look up the registry of available services. Web services are based on an architecture in which the service can be located over the network and its location is transparent, which means that clients may dynamically discover a particular service they wish to use.

  • A mechanism for services to expose well-defined interfaces and a way for clients to access those interfaces.

An important point to note is that Web services are strongly backed by virtually all key players in the Web arena. This backing virtually ensures that Web services technology is here to stay, and its acceptance will become more widespread.

Unlike traditional distributed environments, Web services emphasize interoperability. Web services are independent of a particular programming language, whereas traditional environments tend to be bound to one language or another. Similarly, since they can be easily bound to different transport mechanisms, Web services offer more flexibility in the choice of these mechanisms. Furthermore, unlike traditional environments, Web services are often not bound to particular client or server frameworks. Overall, Web services are better suited to a loosely coupled, coarse-grained set of relationships. Relying on XML gives Web services an additional advantage, since XML makes it possible to use documents across heterogeneous environments.

Web services, by building on existing Web standards, can be used without requiring changes to the Web infrastructure. However, while they may be more firewall friendly than traditional computing environments, Web services tend not to be as efficient in terms of space and time processing.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset