Web Services Basics by ctw10436

VIEWS: 22 PAGES: 20

									29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 27




                                          2
                        Web Services Basics                                                                   1
                                                                                                              2
                                                                                                              3
                                                                                                              4
                                                                                                              5
          If you ask five people to define Web services, you’ll probably get        There’s no one              6
          at least six answers. Some people use the term “Web services” to        official definition of        7
          describe applications that communicate with Simple Object Access        “Web services”              8
          Protocol (SOAP). (SOAP is an XML messaging protocol. We’ll dis-                                     9
          cuss it in detail in Chapter 3.) Other folks use the term to describe                               1
          only the SOAP interface. Still other people vehemently object to the                                1
          idea of constraining the definition to a specific technology such as                                  2
          SOAP. Some people use the term to describe any application that                                     3
          communicates over the Internet. Other people use the term to                                        4
          describe any Web-based application. Some people view Web ser-                                       5
          vices as anything that’s accessible over the Web. And some people                                   6
          use the term to describe the software-as-a-service business model.                                  7
                                                                                                              8
          Given that there is no official consensus within the industry, I am      For the purposes of         9
          establishing my own set of names and definitions. I want to give         this book I am              2
          you a basic grounding to help you understand this technology, so        defining my own              1
          my goal is to make things as simple and straightforward as possible.    terminology                 2
                                                                                                              3
                                                                                                              4
                          What Is a Web Service?                                                              5
          The simplest and most basic definition that I can give you is that       A Web service is an         6
          a Web service is an application that provides a Web API. As men-        application with a          7
          tioned in Chapter 1, an API supports application-to-application         Web API                     8
          communication. A Web API is an API that lets the applications com-                                  9
          municate using XML and the Web.                                                                     3
                                                                                                              3
          So here’s the basic concept: Web services use the Web to perform        Web services use the        3
          application-to-application integration. A lot of the hype around        Web for application-to-     3
          Web services talks about dynamic assembly of Web-based software         application integration     3


                                                                                                         27
    29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 28




             Chapter 2      Web Services Basics




1                                    services. It talks about the software-as-a-service business model.
2                                    It talks about spontaneous discovery of new business partners.
3                                    My advice is to ignore this hype. It’s possible that at some point
4                                    in the future some of these glossy images will become reality, but
5                                    please don’t let the science fiction stories distract you from reality
6                                    or dissuade you from using this technology today to solve real
7                                    business issues.
8
9
0                                                          Why Web Services?
1            Web services help       Rather than “what?” I think the more important question is “why?”
2            you integrate           Why should you care about Web services? The answer is that Web
3            applications            services mitigate the application integration crisis. They help you
4                                    integrate applications, and they do so at a significantly lower price
5                                    point than any other integration technology.
6
7            XML and the             Web services represent a new form of middleware based on XML
8            Web solve the           and the Web. XML and the Web help solve the challenges associ-
9            ”Traditional            ated with traditional application-to-application integration, which
0            Middleware Blues”       I identified in Chapter 1 as the Traditional Middleware Blues. To
1                                    summarize:
2
                                       ❏   Traditional middleware doesn’t support heterogeneity.
3
                                       ❏   Traditional middleware doesn’t work across the Internet.
4
                                       ❏   Traditional middleware isn’t pervasive.
5
                                       ❏   Traditional middleware is hard to use.
6
                                       ❏   Traditional middleware is expensive.
7
                                       ❏   Traditional middleware maintenance costs are outrageous.
8
                                       ❏   Traditional middleware connections are hard to reuse.
9
                                       ❏   Traditional middleware connections are fragile.
0
1            Web services support    Web services address these issues. Web services are platform- and
2            heterogeneous           language-independent. You can develop a Web service using any
3            interoperability        language, and you can deploy it on any platform, from the tiniest
4                                    device to the largest supercomputer. More to the point, any Web


            28
29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 29




                                                                         Defining “Web” and “Service”




          service can be accessed by any other application, regardless of                                       1
          either’s language or platform. Web services communicate using                                         2
          XML and Web protocols, which are pervasive, work both inter-                                          3
          nally and across the Internet, and support heterogeneous                                              4
          interoperability.                                                                                     5
                                                                                                                6
          Web services simplify the process of making applications talk             Web services are            7
          to each other. Simplification results in lower development cost,           inexpensive                 8
          faster time to market, easier maintenance, and reduced total cost                                     9
          of ownership. The bottom line is this: Web services allow you to                                      1
          integrate your applications at a fraction of the cost of traditional                                  1
          middleware.                                                                                           2
                                                                                                                3
          Traditional RPC-style middleware, such as RPC, CORBA, RMI, and            Web services are            4
          DCOM, relies on tightly coupled connections. A tightly coupled            flexible and                 5
          connection is very brittle, and it can break if you make any modi-        adaptable                   6
          fication to the application. Tightly coupled connections are the                                       7
          source of many a maintenance nightmare. In contrast, Web services                                     8
          support loosely coupled connections. Loose coupling minimizes the                                     9
          impact of changes to your applications. A Web service interface pro-                                  2
          vides a layer of abstraction between the client and server. A change                                  1
          in one doesn’t necessarily force a change in the other. The abstract                                  2
          interface also makes it easier to reuse a service in another applica-                                 3
          tion. Loose coupling reduces the cost of maintenance and increases                                    4
          reusability.                                                                                          5
                                                                                                                6
                                                                                                                7
                      Defining “Web” and “Service”                                                               8
          So let’s dig a little deeper into our definition. Just what is a Web       A Web service is            9
          service? If we dissect the name, we can infer that a Web service has      a service that lives        3
          something to do with the Web and something to do with services. I         on the Web                  3
          like to say that a Web service is a service that lives on the Web. This                               3
          definition doesn’t help us very much, though, unless we know the                                       3
          meaning of the terms “Web” and “service.” So let’s start there.                                       3


                                                                                                           29
    29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 30




             Chapter 2       Web Services Basics




1            The Web is a            The Web is an immensely scalable information space filled with
2            huge information        interconnected resources. The architecture for the Web has been
3            space filled with        developed and standardized by the World Wide Web Consortium
4            interconnected          (W3C). A Web resource is any type of named information object—
5            resources               such as a word processing document, a digital picture, a Web page,
6                                    an e-mail account, or an application—that’s accessible through the
7                                    Web. All resources on the Web are connected via the Internet, and
8                                    you access Web resources using standard Internet protocols. Any
9                                    network-enabled application or device can access any resource in
0                                    the Web. Right off the bat, you can see that the Web solves one of
1                                    your integration challenges: The Web is pervasive and provides
2                                    universal connectivity.
3
4            A service is an         A service is an application that exposes its functionality through an
5            application that can    application programming interface (API). In other words, a service
6            be consumed by          is a resource that is designed to be consumed by software rather
7            software                than by humans.
8
9            “Service” refers to     The term “service” implies something special about the application
0            the service-oriented    design. It refers to something known as the service-oriented
1            architecture            architecture (SOA). The SOA is the basic architecture used by
2                                    most RPC-style middleware systems. Chapter 3 talks about the
3                                    SOA in detail.
4
5            An interface hides      One of the most important features of the SOA is the separa-
6            the complexities of     tion of interface from implementation. A service exposes its func-
7            the internal system     tionality through an interface, and that interface hides the inner
8                                    workings of the application. A client application doesn’t need to
9                                    understand how the service actually performs its work. All it
0                                    needs to understand is how to use the interface. To give you an
1                                    analogy, let’s look at a car. A car is a complicated machine, but the
2                                    car provides a set of interfaces that’s relatively simple to use. To start
3                                    a car, you don’t need to know how an internal combustion engine
4


            30
29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 31




                                                                         Defining “Web” and “Service”




          works, or even how the starter motor works. You only need to                                           1
          know how to use the interface that the car supplies to start it: Turn                                  2
          the key.                                                                                               3
                                                                                                                 4
          A Web service possesses the characteristics of both a Web resource        A Web service is             5
          and a service. It is an application that exposes its functionality        both a Web resource          6
          through an API, and it is a Web resource that is designed to be con-      and a service                7
          sumed by software rather than by a human sitting at a browser.                                         8
                                                                                                                 9
          Understanding the concept of a service is key to understanding Web        A service is software        1
          services. A service is a piece of software that does work for other       that does work for           1
          software. In most circumstances, a service runs on a server, waiting      other software               2
          for an application to call it and ask it to do some work. In many                                      3
          cases services don’t provide any type of human interface, and the                                      4
          only way to access the service is through its API.                                                     5
                                                                                                                 6
          A service can perform system functions or business application            A service can                7
          functions. For example, a file service can create, find, save, or           perform system or            8
          delete a file. A stock quote service can retrieve the current ask and      business functions           9
          bid prices of an equity.                                                                               2
                                                                                                                 1
          All client/server technologies rely on this basic concept of a service.   A service plays              2
          A service is the business or system application that plays the part of    the role of server           3
          the server in a client/server relationship. Print servers, file servers,   in a client/server           4
          database servers, Web servers, and application servers are all            relationship                 5
          examples of service-oriented systems.                                                                  6
                                                                                                                 7
          Any business application that exposes its capabilities through an         Application services         8
          API is a service. Business application services often run in an appli-    often run in an              9
          cation server. An application server manages and coordinates the          application server           3
          utilization of all resources available in a shared, multiprocessing                                    3
          environment, enabling optimized performance, scalability, reliabil-                                    3
          ity, and availability.                                                                                 3
                                                                                                                 3


                                                                                                            31
    29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 32




             Chapter 2         Web Services Basics




1            Figure 2-1: A service
             can be shared by
2                                         Browser
             many different                              Web Store           Su
                                           Client                                 bm
3            applications.                                                             it O
                                                                                              rde
4                                                                                                   r
                                          Browser                     Get O
                                                           Portal                 rder
5                                          Client                                           Statu
                                                                                                         s
6                                                                                                                 Order
                                          Desktop                     List Back Orders
7                                                          Report                                              Processing
                                           Client                                                                Service
                                                                                                        tory
8                                                                                           er His
                                                                             stom
                                                                      Get Cu
9                                         Desktop
                                                                                                   tor
                                                                                                         y
                                                            CRM                               is
                                           Client                                          rH
0                                                                                     de
                                                                             t   Or
1                                                                         Ge
                                        Spreadsheet
                                                          Analytics
2                                          Client
3
4            A service is a            You often need this type of scalability because many different users
5            shared resource           can share a single service. A service is a shared resource. One rea-
6                                      son you might want to design a business application as a service is
7                                      to consolidate your efforts and reduce duplicated work. If there is a
8                                      particular piece of functionality that many of your applications
9                                      need to perform, you should build this functionality as a service
0                                      rather than reimplement the functionality in each application.
1
2            One service can           For example, as shown in Figure 2-1, it’s much simpler and
3            support many              easier to manage and maintain your order processing system if
4            applications              you have only one application service that actually processes
5                                      orders. This one service can support all the different ways that
6                                      you offer to place orders, inquire about order status, and generate
7                                      reports about orders.
8
9                                                             Building Services
0            You use middleware        To let clients access a service over the network, you must build a
1            to create your            network API for the service. You generally use some type of com-
2            network API               munication middleware to create a network API. You can use a
3                                      traditional middleware technology, such as RPC, DCOM, CORBA,
4                                      RMI, or MOM, but all these technologies suffer from the Traditional


            32
29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 33




                                                                                                    Web Evolution




          Middleware Blues. If you want to make your services available to                                               1
          heterogeneous users across multiple systems (including the Inter-                                              2
          net) at a reasonable cost, you should use middleware technology                                                3
          that supports these requirements.                                                                              4
                                                                                                                         5
          Web services represent a new type of middleware that relies on                        Web services are         6
          the Web. The Web resolves the pervasive aspects of the Traditional                    Web-based                7
          Middleware Blues.1 The Web is pervasive. The Web is free. The Web                     middleware               8
          is completely vendor-, platform-, and language-independent. The                                                9
          Web uses the Internet as its native communication protocol. Web                                                1
          services support easy integration, flexibility, and service reusability.                                        1
                                                                                                                         2
                                                                                                                         3
                                         Web Evolution                                                                   4
          The Web was originally created to support interactive communica-                      The Web was              5
          tion. People use the Web to communicate with other people and to                      designed for             6
          access information. You use e-mail and instant messaging to con-                      interactive              7
          verse with friends and colleagues. You use a browser to access                        communication            8
          information.                                                                                                   9
                                                                                                                         2
          In the early days of the Web, a Web site was simply a set of static                   A dynamic Web site       1
          pages that were stored in files. You could view only the text and                      allows people to talk    2
          pictures contained in these files. To change what users saw, a Web                     to applications          3
          site operator had to edit the files. Soon we realized that we could                                             4
          also use the Web to access dynamic information. When you link                                                  5
          to a dynamic page, the Web server doesn’t merely display a file.                                                6
          Instead it calls an application that dynamically generates and ren-                                            7
          ders the requested information. The introduction of this technique                                             8
          marked the point when the Web evolved to allow people to talk to                                               9
          applications.                                                                                                  3
                                                                                                                         3
                                                                                                                         3
          1 The   other Traditional Middleware Blues tend to be a function of tightly coupled                            3
          connections. Web services solve these issues using XML. Chapter 3 discusses XML.                               3


                                                                                                                    33
    29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 34




             Chapter 2        Web Services Basics




1            Web services allow       Web services represent the next step in the Web’s evolution
2            applications to talk     because they allow applications to talk to applications. Web-based
3            to applications          application-to-application integration allows us to exploit the uni-
4                                     versal connectivity and immense scalability of the Web, and it sup-
5                                     ports a much richer set of usage models than do human-oriented
6                                     applications.
7
8            Web sites support        Figure 2-2 summarizes the differences between a Web site and a
9            humans; Web              Web service. A Web site represents a group of Web resources that
0            services support         are designed to be accessed by humans, and a Web service repre-
1            software                 sents a group of Web resources that are designed to be accessed by
2                                     applications.
3
4            A service interface      The interfaces to these two types of applications are fundamentally
5            must be structured       different. A Web site supports human clients who have a tremen-
6            and unambiguous          dous capacity to interpret the meaning of information. The site
7                                     returns information as a Hypertext Markup Language (HTML)
8                                     page—a string of text containing formatting information, often
9                                     including graphics, clickable buttons, and links. A human interprets
0                                     this information based on visual layout and physical association. In
1                                     contrast, an application can’t interpret information this way. An
2
             Figure 2-2: A Web
3
             site is designed to be
4            accessed by humans.
             A Web service is
5
             designed to be
6            accessed by
             applications.
                                                                         Web site
7
8
9
0
1
2
                                                                       Web service
3
4


            34
29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 35




                                                        Understanding the Scope of Web Services




          application needs unambiguous information. It needs to know                                    1
          what programmatic functions are available, and it needs to know                                2
          how to structure and interpret the data being exchanged. A Web                                 3
          API defines these programmatic functions and data structures in a                               4
          completely unambiguous way.                                                                    5
                                                                                                         6
                                                                                                         7
             Defining Characteristics of Web Services                                                     8
          A Web service exhibits the following defining characteristics:        A Web service is a        9
                                                                               Web resource that         1
            ❏   A Web service is a Web resource. You access a Web service                                1
                                                                               provides an API
                using platform-independent and language-neutral Web                                      2
                protocols, such as HTTP. These Web protocols ensure easy                                 3
                integration of heterogeneous environments.                                               4
            ❏   A Web service provides an interface—a Web API—that can be                                5
                called from another program. This application-to-application                             6
                programming interface can be invoked from any type of appli-                             7
                cation. The Web API provides access to the application logic                             8
                that implements the service.                                                             9
            ❏   A Web service is typically registered and can be located                                 2
                through a Web service registry. A registry enables service                               1
                consumers to find services that match their needs. These ser-                             2
                vice consumers may be humans or other applications.                                      3
            ❏   Web services support loosely coupled connections between                                 4
                systems. Web services communicate by passing XML mes-                                    5
                sages to each other via a Web API, which adds a layer of                                 6
                abstraction to the environment that makes the connections                                7
                flexible and adaptable.                                                                   8
                                                                                                         9
                                                                                                         3
            Understanding the Scope of Web Services                                                      3
          So now that we have the basic definition down, let’s go back to the   Web services concepts     3
          big picture. How do you build Web services? What do you need to      can be divided into       3
          run Web services? How do you use Web services? Obviously this        four layers               3


                                                                                                    35
    29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 36




             Chapter 2         Web Services Basics




1                                      topic covers a lot of territory. Figure 2-3 divides the scope of our
2                                      discussion into four basic concepts: XML and Web services tech-
3                                      nologies, Web services infrastructure, Web services, and Web
4                                      services application templates. Each layer builds on the layers
5                                      below it.
6
7            XML and Web               The bottom layer in Figure 2-3 comprises XML and Web services
8            services technologies     technologies. These technologies provide the foundation for Web ser-
9            provide the               vices. Don’t worry about all the acronyms used in this illustration.
0            foundation for            We’ll take a closer look at these technologies in Chapters 3–5. (If you
1            Web services              can’t wait, you can find definitions for the acronyms in the Glossary.)
2
3            Infrastructure refers     The next layer in Figure 2-3 represents Web services infrastruc-
4            to products that          ture: products that implement the XML and Web services technolo-
5            implement Web             gies. You use these products to build, deploy, manage, and use Web
6            services technologies     services. Chapters 8 and 9 will take a closer look at Web services
7                                      infrastructure.
8
9            Figure 2-3: Web
0            services concepts
             can be divided into
1                                                               Web Services Application Templates
             four logical layers:
2            XML and Web
                                                                         CRM          EAI
             services technol-                                ERP                                   B2B
                                                 Portal                                                           ...
3            ogies, Web services
4            infrastructure, Web                                          Web Services
             services, and Web
5            services application                Sales         Order     Weather        Stock         Map and
                                                                                                                        ...
                                                 quote       tracking    reports       trading       directions
6            templates.

7                                                                   Web Services Infrastructure
8                                                Tools and
                                                                Containers     Infrastructure     Management            ...
                                                frameworks                                        frameworks
9                                                               and servers       services

0
                                                 SOAP           XML and Web Services Technologies          BPEL4WS
1                                                            WSDL                                 ebXML
                                                 XML                    UDDI        WSS                           ...
2                                                         XML Schema                                 SAML
                                                                        XSLT     XML Signature
3
4


            36
29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 37




                                                                     Web Services Business Models




          A Web service represents an information resource or business            Web services are             1
          process that you have made available to other applications through      applications that            2
          a Web API. In particular, it is a resource that supports application-   communicate using            3
          to-application communication using Web services infrastructure.         Web services                 4
          You can turn any piece of application code into a Web service. A        infrastructure               5
          Web service can do whatever you’ve programmed it to do. Fig-                                         6
          ure 2-3 lists five sample Web services: sales quote, order tracking,                                  7
          weather reports, stock trading, and map and directions.                                              8
                                                                                                               9
          Web services application templates represent the kinds of appli-        Application                  1
          cations and initiatives for which Web services technology offers        templates represent          1
          substantial benefits. The list of templates in Figure 2-3 is by no       systems that benefit          2
          means exhaustive, but it identifies some of the more popular uses        from Web services            3
          of Web services, such as portals, enterprise resource planning, cus-                                 4
          tomer relationship management, enterprise application integration                                    5
          initiatives, and business-to-business integration. We’ll discuss a                                   6
          number of real-life Web services applications in this chapter and                                    7
          in Chapter 7.                                                                                        8
                                                                                                               9
                                                                                                               2
                    Web Services Business Models                                                               1
          You may have noticed that I didn’t list software-as-a-service as a      Web services is not a        2
          Web services application template. That’s because software-as-a-        business model               3
          service isn’t an application. It’s a business model in which you                                     4
          license subscription rights to access hosted software rather than                                    5
          license the rights to deploy the software in your own organization.                                  6
          For example, Salesforce.com uses the software-as-a-service busi-                                     7
          ness model. Salesforce.com hosts a CRM system, and users pay a                                       8
          monthly subscription fee to use the software.                                                        9
                                                                                                               3
          A lot of the early hype about Web services led many people to           Many people equate           3
          equate Web services with the software-as-a-service business model.      Web services with            3
          The hype projects a blue-sky vision of being able to dynamically        software-as-a-service        3
          discover, assemble, and consume Internet-based software services.                                    3


                                                                                                          37
    29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 38




             Chapter 2       Web Services Basics




1                                    But IDC predicts that the realization of this vision is at least 10 years
2                                    away. I view that prediction as optimistic.
3
4            Web services should     My point is that, except in a few rare circumstances, you don’t sell a
5            support your existing   Web service. Instead you sell some other type of product or service,
6            business models         and you use Web services to help you do that. Only in very rare cir-
7                                    cumstances are Web services the focus of their own business model.
8                                    Without a viable business model, it’s hard to create a business case
9                                    for Web services. For example, let’s look at Google.
0
1
                                                                    Google
2
             Google’s business       Google is the world’s leading Web search company. Google provides
3
             model is based on       a public search engine that contains an index of more than three
4
             advertising             billion Web pages. The normal interface to this search engine is a
5
                                     human-oriented browser interface. The business model that sup-
6
                                     ports this public service is advertising. Users can access the service
7
                                     for free in exchange for viewing a few ads. Google collects revenues
8
                                     from the businesses that place the ads.
9
0
             The Google Web          Google also provides a Web service interface to this public search
1
             service provides an     engine. It calls this Web service the Google Web APIs. You can use
2
             API to the search       these Web APIs to query the Google search engine from an applica-
3
             engine                  tion rather than from a browser. The results of the search are
4
                                     returned as structured data so that the requesting application can
5
                                     process the information.
6
7
             Google is encour-       As of the time of this writing, this Web service is still in an experi-
8
             aging users to create   mental stage. Google is encouraging developers to use their imagi-
9
             innovative appli-       nation to create new and interesting applications using the Google
0
             cations using these     Web APIs. Here are three examples:
1
             Web APIs
2                                      ❏   Subject monitoring: issue regularly scheduled Web searches to
3                                          find any new information on a particular subject
4


            38
29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 39




                                                                       Web Services Business Models




            ❏   Market research: issue regularly scheduled Web searches and                                    1
                analyze the difference in the amount of information available                                  2
                on the subject over time                                                                       3
            ❏   Plagiarism search: search for phrases from a piece of writing to                               4
                ensure that it is original material                                                            5
                                                                                                               6
          Researchers and developers may be excited about the Google Web            The Google Web
                                                                                                               7
          APIs, but it’s hard to figure out what benefit Google will gain from        APIs undermine
                                                                                                               8
          this Web service other than goodwill. The Google Web APIs under-          Google’s normal
                                                                                                               9
          mine Google’s normal business model. The Google Web APIs don’t            business model
                                                                                                               1
          constitute a new service. Instead they simply provide a program-
                                                                                                               1
          matic interface to Google’s public Web search engine. The Web APIs
                                                                                                               2
          are free. Users are required to register, and they are limited to 1,000
                                                                                                               3
          queries per day per user, but users of the Google Web APIs don’t
                                                                                                               4
          receive the Google advertisements.
                                                                                                               5
                                                                                                               6
          The cost of an individual Google search is minuscule. Google views        Web services should
                                                                                                               7
          it as a reasonable investment to give away a few million searches in      support your existing
                                                                                                               8
          exchange for the generation of goodwill. But in general, I wouldn’t       business models
                                                                                                               9
          recommend that you follow Google’s example. Web services should
                                                                                                               2
          be designed to support your existing business model. They should
                                                                                                               1
          provide a new or improved mechanism to sell or use an existing
                                                                                                               2
          product or service.
                                                                                                               3
                                                                                                               4
                                        Kinko’s                                                                5
          For example, let’s look at Kinko’s, the world's leading provider          “File, Print . . .         6
          of document solutions and business services. Kinko’s has offered          Kinko’s” will allow        7
          a browser-based utility for quite a while that allows you to send         you to send a print        8
          documents from your PC directly to Kinko’s for printing. Now              job to Kinko’s             9
          Kinko’s wants to use Web services to make the process even more           directly from your         3
          seamless. Kinko’s plans to roll out a “File, Print . . . Kinko’s” Web     Office application          3
          service in mid-2003. This Web service allows you to send a print                                     3
          job to Kinko’s over the Internet directly from any Microsoft Office                                   3
                                                                                                               3


                                                                                                          39
    29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 40




             Chapter 2     Web Services Basics




1                                    application. The service will require you to install a small add-
2                                    in to Office, which will supply the client interface to the Kinko’s
3                                    Web service. After you’ve installed this add-in, “Kinko’s” will
4                                    appear in your list of printers when you select File and Print . . .
5                                    from the Office menu. When you select the Kinko’s print service,
6                                    Office will launch Kinko’s client interface, which then presents
7                                    you with an easy-to-use dialog box to guide you through the
8                                    process of submitting a print job. The dialog box will help you
9                                    find a convenient Kinko’s location, select options such as stapling
0                                    and binding, and specify payment, notification, and delivery
1                                    methods.
2
3            You can send the        Suppose you’re sitting in your hotel room writing a proposal in
4            print job to any        Microsoft Word. When you’re finished, you select File, Print . . .
5            Kinko’s anywhere        Kinko’s. The hotel’s high-speed Internet connection sends the print
6            in the world            job to a Kinko’s in another city, and the proposal is delivered
7                                    directly to your client. Kinko’s will even send you a notification
8                                    when the job is complete.
9
0            Kinko’s Web             The “File, Print . . . Kinko’s” Web service doesn’t compete with the
1            service supports        company’s core business model. It enhances it by providing another
2            the company’s core      way for users to submit print jobs. And it provides a level of conve-
3            business model          nience that many users will certainly appreciate.
4
5                                                                 Amazon
6            Amazon provides a       Amazon also uses Web services to enhance its core business
7            Web API to support      model. Amazon’s business model is based on online retail sales.
8            its marketing           Amazon is renowned for the features of its online catalog, which
9            affiliates               provides the primary consumer sales interface. The catalog is
0                                    designed to be viewed by a human sitting at a browser. Amazon
1                                    also wants to make this catalog available to applications so that
2                                    its 800,000 marketing affiliates can more easily sell products for
3                                    Amazon. So Amazon created a Web API for its catalog. Before it
4                                    offered this Web API, it was quite difficult to access the Amazon


            40
29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 41




                                                                      Web Services Business Models




          catalog from an application. You needed to build a screen scraping                                  1
          application that simulated a human sitting at a browser.                                            2
                                                                                                              3
          The new Amazon Web API allows Amazon’s marketing affiliates              Amazon hopes its            4
          to easily incorporate Amazon content and features into their Web        Web service will            5
          sites. Many of Amazon’s most popular search facilities—such as          boost book sales            6
          keyword search, ISBN search, and even “Listmania!”—are available                                    7
          through the Web service. Now consumers can buy products from                                        8
          Amazon transparently through the affiliate sites. The affiliate Web                                   9
          site uses the Amazon Web service to search Amazon’s catalog and                                     1
          display the results on its own site, including features such as Ama-                                1
          zon reviews and book ratings. This free Web service is a win-win                                    2
          situation for both the affiliates and Amazon. Each time a consumer                                   3
          makes an Amazon purchase through the affiliate site, the affiliate                                    4
          earns a 15% referral fee. Meanwhile Amazon expects to see a                                         5
          boost in product sales.                                                                             6
                                                                                                              7
                                          UPS                                                                 8
          UPS also uses Web services to promote sales. UPS provides a set of      UPS OnLine Tools            9
          Web APIs called UPS OnLine Tools. Businesses can use these APIs         streamline the              2
          to connect their applications directly to the UPS logistics system to   logistics process           1
          add integrated shipping, tracking, and related functionality. UPS                                   2
          OnLine Tools are available at no charge, and UPS provides free                                      3
          e-mail support. As with Amazon, this Web service offers a win-                                      4
          win situation. Customers appreciate the way this Web service                                        5
          can streamline their logistics process; UPS can expect to see an                                    6
          increase in UPS shipments.                                                                          7
                                                                                                              8
                                       T-Mobile                                                               9
          Sometimes Web services can help enable a new business model.            T-Mobile uses Web           3
          T-Mobile International, a division of Deutsche Telekom, is one of       services to enable a        3
          the world’s leading international mobile communication providers.       new business model          3
          One of its service offerings, T-Mobile Online, provides a wireless                                  3
          Web portal for more than three million T-Mobile customers in                                        3


                                                                                                         41
    29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 42




             Chapter 2       Web Services Basics




1                                     Austria, the Czech Republic, Germany, and the United Kingdom.
2                                     As with most wireless plans, the business model is based on con-
3                                     sumer usage.
4
5            T-Mobile needs           When first planning T-Mobile Online, T-Mobile realized that to
6            interesting content to   promote consumer usage it needed to provide interesting content
7            attract users            on the portal. Recruiting content providers was critical to the suc-
8                                     cess of this new venture. T-Mobile needed to make sure that it was
9                                     as easy as possible for content providers to join the network.
0
1            The content              One of the biggest challenges T-Mobile faced was figuring out a way
2            providers need           to give the content providers access to information about individual
3            consumer info and        consumers. Providers need this information to furnish customized,
4            billing services         localized, useful content. Another challenge was devising an afford-
5                                     able micro-payment system to ensure that the content providers
6                                     got paid for their services.
7
8            Web services ensure      Given that each content provider might have a completely dif-
9            easy content             ferent IT infrastructure, T-Mobile elected to use Web services. All
0            integration              consumer information and billing services are made available to the
1                                     content providers as Web services, as shown in Figure 2-4. The Web
2                                     services ensure that content providers can quickly, easily, and in-
3                                     expensively integrate their content into the T-Mobile portal.
4
5            Web services enable      This venture has been very successful. T-Mobile Online has enlisted
6            this m-commerce          more than 200 content providers to make the wireless Web inter-
7            business model           esting and appealing to T-Mobile consumers. Through T-Mobile
8                                     Online, these content providers provide services such as e-mail,
9                                     Short Message Service (SMS) messaging, news, sports scores,
0                                     restaurant recommendations, directions, stock trading, banking,
1                                     ticket purchases, gambling, and more. T-Mobile doesn’t charge
2                                     either its consumers or the content providers for these Web ser-
3                                     vices. Instead T-Mobile makes money from the increased airtime
4


            42
29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 43




                                                                                       Web Services Business Models




                                                                                                                                       1
                                                2 Access Application                                                                   2
                                                                                                  Content                              3
                                                                                                  Provider                             4
                 Consumer
                                                  1 Log on and Make
                                                                                                                                       5
                                                  Menu Selection                                                                       6
                                  Gateway
                                                                                                                                       7




                                                           Web Portal




                                                                                    Web API
                                                                                                         3 Service Calls
                                                                                                                                       8
                                                                         T-Mobile
                                                                                                                                       9
                                      4 Return to                                                                                      1
                                      T-Mobile
                                                                                                                                       1
                                                 Session                Consumer         Messaging and                                 2
                                                                                                              Payments
                                               Management                Profile          Notifications                                3
                                               Location and
                                                                        Bookmarks             Calendar
                                                                                                              Address                  4
                                                Presence                                                       Book
                                                                                                                                       5
                                                                              Web Services
                                                                                                                                       6
                                                                                                                                       7
          Figure 2-4: T-Mobile Web services maintain user session information, automatically capture and manage
                                                                                                                                       8
          billing and payment services, and allow content providers to obtain information about consumers.
                                                                                                                                       9
                                                                                                                                       2
          the consumers use to access these third-party offerings. The Web                                                             1
          services aren’t the focus of the business model, but it wouldn’t                                                             2
          work without them.                                                                                                           3
                                                                                                                                       4
                                  Internal Integration                                                                                 5
          In the examples I’ve cited so far, I’ve talked only about external                                 Web services can          6
          integration applications. One key theme that permeates all these                                   make it easier for        7
          examples is that Web services can make it easier for your customers                                your customers            8
          or partners to do business with you. Anything that simplifies busi-                                 and partners to do        9
          ness integration is a valuable commodity. Another recurring theme                                  business with you         3
          is that Web services do not themselves define a business model.                                                               3
          Instead, they support existing business models, and in some cir-                                                             3
          cumstances they enable a new business model.                                                                                 3
                                                                                                                                       3


                                                                                                                                  43
    29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 44




             Chapter 2        Web Services Basics




1            Web services             Although the external applications are interesting, most production
2            lower the cost           applications based on Web services are internal application projects.
3            of application           As with external Web services, internal Web services should sup-
4            integration              port your core business model. You can use them to improve and
5                                     optimize your internal application systems to make your business
6                                     processes work better. The first and foremost reason you should be
7                                     exploring Web services is that they can dramatically lower the cost
8                                     of application integration.
9
0            Merrill Lynch            Merrill Lynch completed an internal application integration
1            saved more than          project in 2002. The idea was to build an integration bus to pro-
2            96% on a project         vide access to mainframe-based Customer Information Control
3            with Web services        System (CICS) applications. An integration bus is a common
4                                     pathway that multiple applications can use to communicate. The
5                                     original estimated cost for the project based on message-oriented
6                                     middleware was $800,000. Then the company switched to Web
7                                     services technology. Rather than purchase software licenses for
8                                     the MOM technology on a host of different platforms and then
9                                     build a bunch of adapters to allow the various client applications
0                                     to use the MOM middleware, Merrill Lynch developed a small
1                                     SOAP gateway for the CICS environment for only $30,000. Now
2                                     any client environment can access the CICS environment using
3                                     SOAP, and Merrill Lynch doesn’t need any special software or any
4                                     special adapters on any of its systems.
5
6
7                                                          Executive Summary
8            A Web service is an      The simplest definition of a Web service is an application that pro-
9            application that         vides a Web API. The Web API exposes the functionality of the
0            provides a Web API       application to other applications. The Web API relies on Web ser-
1                                     vices technology to manage communications. Web services tech-
2                                     nology is pervasive, vendor-independent, language-neutral, and
3                                     very low-cost.
4


            44
29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 45




                                                                                 Executive Summary




          The purpose of a Web API is to enable application integration.           A Web API                   1
          More specifically, a Web API lets you integrate heterogeneous             enables application         2
          applications. You can use Web services to achieve many different         integration                 3
          goals. You can use them to implement internal point-to-point appli-                                  4
          cation integration projects. You can use them to consolidate your                                    5
          development efforts and reduce redundant applications. You can                                       6
          use them to implement a general-purpose integration bus for                                          7
          your internal application systems. And you can use them to make                                      8
          it easier for your partners and your customers to do business                                        9
          with you.                                                                                            1
                                                                                                               1
          Web services do not represent a new business model. Instead Web          Web services should         2
          services are a technology that you can use to build systems to sup-      support your core           3
          port a business model.                                                   business model              4
                                                                                                               5
          IT departments are being asked to do more with less. There’s less        Web services let you        6
          money in the budget to buy software, and there are fewer people to       do more with less           7
          do the work. Nearly every application development project involves                                   8
          some level of application integration. It just makes sense to reduce                                 9
          the cost and simplify the process of doing integration. Web services                                 2
          are an obvious choice.                                                                               1
                                                                                                               2
                                                                                                               3
                                                                                                               4
                                                                                                               5
                                                                                                               6
                                                                                                               7
                                                                                                               8
                                                                                                               9
                                                                                                               3
                                                                                                               3
                                                                                                               3
                                                                                                               3
                                                                                                               3


                                                                                                          45
29731 02 pp. 027-046 r4jm.ps 5/16/03 9:57 AM Page 46

								
To top