What Is a Web Service?


This is a book about building Web services. We cannot describe how to build a Web service without first clarifying what we mean by a Web service.

The term Web services has gained a lot of momentum in the last year. Many software vendors (large and small) are announcing Web services initiatives and adoption (see the sidebar "Web Services Market Dynamics"). Many organizations are involved in the refinement of Web services standards. Although there seems to be a slow convergence towards a common understanding of what the term means, there is no single, universally adopted definition of what is meant by the term Web service. This situation is reminiscent of the early days of object-oriented programming: Not until the concepts of inheritance, encapsulation, and polymorphism were well defined did object-oriented programming become accepted into the mainstream of development methodologies.

Several major Web services infrastructure providers have published their definitions for a Web service:

IBM offers this definition at http://www4.ibm.com/software/solutions/Webservices/pdf/WSCA.pdf:

A Web service is an interface that describes a collection of operations that are network accessible through standardized XML messaging. Web services fulfill a specific task or a set of tasks . A Web service is described using a standard, formal XML notion, called its service description, that provides all of the details necessary to interact with the service, including message formats (that detail the operations), transport protocols, and location.

The nature of the interface hides the implementation details of the service so that it can be used independently of the hardware or software platform on which it is implemented and independently of the programming language in which it is written. This allows and encourages Web services based applications to be loosely coupled , component-oriented , cross-technology implementations . Web services can be used alone or in conjunction with other Web services to carry out a complex aggregation or a business transaction.

Microsoft has a couple of definitions for Web service. The first is at http:// msdn.microsoft.com/library/default.asp?url=/nhp/Default.asp?contentid=28000442:

A Web service is a unit of application logic providing data and services to other applications. Applications access Web services via ubiquitous Web protocols and data formats such as HTTP, XML, and SOAP, with no need to worry about how each Web service is implemented. Web services combine the best aspects of component-based development and the Web, and are a cornerstone of the Microsoft .NET programming model.

The other Microsoft definition is at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnWebsrv/html/Websvcs_platform.asp:

A Web service is programmable application logic accessible using standard Internet protocols. Web services combine the best aspects of component-based development and the Web. Like components , Web services represent black-box functionality that can be reused without worrying about how the service is implemented. Unlike current component technologies, Web services are not accessed via object-model-specific protocols, such as the distributed Component Object Model (DCOM), Remote Method Invocation (RMI), or Internet Inter-ORB Protocol (IIOP). Instead, Web services are accessed via ubiquitous Web protocols and data formats, such as Hypertext Transfer Protocol (HTTP) and Extensible Markup Language (XML). Furthermore, a Web service interface is defined strictly in terms of the messages the Web service accepts and generates. Consumers of the Web service can be implemented on any platform in any programming language, as long as they can create and consume the messages defined for the Web service interface.

Sun provides the following definition at http://www.sun.com/software/ sunone /faq.html#2:

Web services are software components that can be spontaneously discovered , combined, and recombined to provide a solution to the user 's problem/request. The Java language and XML are the prominent technologies for Web services.

As you can see, there is broad agreement on what a Web service might be, but no single agreed-upon definition. Many developers will claim they cannot define what a Web service is, but they know one when they see one.

From the perspective of this book, a Web service is a platform and implementation independent software component that can be:

  • De scribed using a service description language

  • Published to a registry of services

  • Discovered through a standard mechanism (at runtime or design time)

  • Invoked through a declared API, usually over a network

  • Composed with other services

One important point is that a Web service need not necessarily exist on the World Wide Web. This is an unfortunate historical naming issue. A Web service can live anywhere on the network, Inter- or intranet; some Web services can be invoked by a simple method invocation in the same operating system process, or perhaps using shared memory between tightly coupled processes running on the same machine. In fact, Web services have little to do with the browser-centric, HTML-focused World Wide Web. Sometimes, the names we choose in the information technology (IT) industry don't make a lot of sense; they simply take on a life of their own.

Another important point is that a Web service's implementation and deployment platform details are not relevant to a program that is invoking the service. A Web service is available through its declared API and invocation mechanism (network protocol, data encoding schemes, and so on). This is analogous to the relationship between a Web browser and a Web application server: Very little shared understanding exists between the two components. The Web browser doesn't particularly care if the Web application server is Apache Tomcat, Microsoft IIS, or IBM Websphere. The shared understanding is that they both speak HTTP and converse in HTML or a very limited set of MIME types. Similarly, the Web application server really doesn't care what kind of client is using itvarious brands of Web browsers or even non-browser clients . This minimal shared understanding between components allows Web services to form a system of loosely coupled components.

Business Perspective

To a business person, the Web services approach is all about integration: integrating application functionality within an organization or integrating applications between business partners (in a supply chain, for example). The scenario in this book illustrates this approach, particularly in Chapter 7, "Discovering Web Services." This application integration allows time and cost efficiencies for receiving purchase orders, answering status inquiries, processing shipment requests , and so on. The important point is that application integration is enabled without tight lock-in to any particular business partner. If another supplier has a better price, shipping terms, or quality assurance, then a company's reorder systems can be easily repositioned to use that supplier; doing so is as easy as pointing a Web browser at a different Web site. With a broader adoption of Web services and XML document format standards, this style of dynamic business partner integration will become more broadly used.

When systems are this easy to integrate, an organization's reach to suppliers, customers, and other business partners is extended, yielding cost savings, flexible business models, better customer service, higher customer retention, and so on. Just as IT is fundamental to the efficient operations of an organization, Web services-based systems integration will be fundamental to flexible, lightweight systems integrationfor internal application integration within an organization over an intranet and external partner integration over the Intranet or extended virtual private network.

So, from a business perspective, a Web service is a business process or step within a business process that is made available over a network to internal and/or external business partners to achieve some business goal.

Technical Perspective

From a technical perspective, a Web service is nothing more than a collection of one or more related operations that are accessible over a network and are described by a service description. At this level, the Web services concept is not new. With Web services, the IT industry is trying to address the fundamental challenge of distributed computing that has been around for decadeslocating and accessing remote systems. The big difference is that now the industry is approaching this problem using open technology (XML and Internet protocols) and open standards managed by broad consortia such as the World Wide Web Consortium graphics/book.gif (W3C, which manages the evolution of the SOAP and WSDL specifications). Further, the approach often taken with Web services uses capabilities-based lookup graphics/book.gif , where the kind of service is searched for, as opposed to a service of a particular name or object identifier.



Building Web Services with Java. Making Sense of XML, SOAP, WSDL and UDDI
Building Web Services with Java: Making Sense of XML, SOAP, WSDL and UDDI
ISBN: B000H2MZZY
EAN: N/A
Year: 2001
Pages: 130

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net