slides-10- - epfl

Download slides-10-  - EPFL

Post on 19-Jan-2017




0 download

Embed Size (px)


  • Lecture 10:Web Services

  • OutlineOverview of Web ServicesSOAP (messaging)WSDL (service description)UDDI (registry)

  • A bit of buzz (1)By 2006, Web services will take hold as a competitive differentiator in business relationships and product innovation. Enterprises that want to remain competitive will need to use Web services to provide commonly requested data to their partners. It is imperative that enterprises develop a strategy for how to use Web services to develop products, including hard goods, digital goods and services.

    Gartner Research, November 2003

  • A bit of buzz (2)Yankee Group, Nov. 2004 survey (437 entreprises)48% have already deployed Web Services39% will deploy Web Services within one year71% will increase spending on Web Services in 2005

    Jeff Bezos (CEO Amazon), Tech. Review 01/2005Web 1.0 was making the Internet for people; Web 2.0 is making the Internet better for computers

  • What is a Web Service?A web service is a network accessible interface to application programs, built using standard Internet technologies.Clients of web services do NOT need to know how it is implemented.


  • Web Services: Some DefinitionsA Web Service is a URL-addressable software resource that performs functions (or a function).

    "Web services are a new breed of Web application. They are self-contained, self-describing, modular applications that can be published, located, and invoked across the Web. Web services perform functions, which can be anything from simple requests to complicated business processes. Once a Web service is deployed, other applications (and other Web services) can discover and invoke the deployed service. IBM web service tutorial

    The notion of web services captures a recent technological development that aims at the possibility to access services (i.e. applications) through the Internet infrastructure (i.e. Web standards). Technologically they represent only a small change as compared to earlier distributed computing standards, but the impact of this new technology is considered as being very high as it facilitates automated distributed computing and information access by taking advantage of the ubiquitously available Web infrastructure. In particular on-demand use of software is considered as one of the important developments Web service technology is going to support.

  • Web Evolution

    TechnologyTCP/IPHTMLXMLPurposeConnectivityPresentationProgrammabilityApplicationsE-Mail, FTPWeb PagesWeb ServicesOutcomeCreate the WebBrowse the WebProgram the Web

  • Web Service Architecture

    Service providerService brokerService requestorpublish(WSDL)find(UDDI)bind(SOAP)

    The Web architecture consists of three componentsThe service providers that publish available services and offer bindings for servicesThe service brokers that allow service providers to publish their services (register and categorize). They provide also mechanisms to locate services and their providersThe service requestor that uses the service broker to find a service and then invokes (or binds) the service offered by a service provider.

    Note that this architecture corresponds 1:1 to the CORBA model of server-naming service-client.For each of the three activities the Web services architecture provides specific standards, namely SOAP, WSDL, and UDDI. SOAP and WSDL are W3C standards, whereas UDDI is an OASIS standard.

  • Web Service StackA set of standards for implementing web services

    Transport: HTTP, SMTP, FTTP, Messaging: SOAPService Description: WSDLPublication and Discovery: UDDIextends HTTPextends HTMLextends URI

    The different standards of the web services architecture establish a communication infrastructure that can be viewed as a high-level protocol stack, where each higher level protocol builds on the lower level protocol:The web service transport layer is responsible for the basic communication between web services and builds on existing Internet (application) protocol standardsThe messaging layer uses the XML-based Simple Object access Protocol for exchanging messages in a request/reply fashion in a distributed environmentThe description layer allows describing interfaces of web services including operations and their parameters. The descriptions are based on the XML-based WSDL standard (Web Service Description Language)The publication and discovery layer provides the mechanisms for the service brokers. This layer is based on the Universal Description, Discovery and Integration (UDDI) standard, a standard that defines XML-based service AND business descriptions, and a SOAP-based standard API to interact with the service broker.

    On can view each of the three higher layers of this protocol stack as an extension of existing WWW protocols for supporting services instead of simple document access. SOAP extends HTTP allowing not only document requests but also service requests. WSDL extends HTML by allowing to describe services instead of the structure of documents. UDDI extends URI by allowing to locate services instead of documents only.

  • Basic Web Service Usage Scenario

    Web Service Repository(UDDI)publish webserviceWeb ServiceProvider 1 registerWSDL file(manually)(manual) web service lookup2 http get 3 WSDL file write clientapplicationdeploy clientapplication4 SOAP request 5 SOAP response

    This figure illustrates a (possible) basic Web service usage scenario. A Web service provider registers it's web service at a UDDI repository. This could be done manually through a Web interface or through a UDDI API. He registers the description of the web service which is given in WSDL. A potential user may, for example, manually look up in the UDDI repository the Web service through http and obtain the WSDL file. This file contains all the information needed in order to access the Web service. Based on this information he/she implements a client application that makes use of the web service. When the client application is executed it accesses the web service by using the SOAP protocol for service invocation.

  • Web Services ImplementationApplication Server (web service-enabled)provides implementation of services and exposes it through WSDL/SOAPimplementation in Java, as EJB, as .NET (C#) etc.SOAP serverimplements the SOAP protocolHTTP serverstandard Web serverSOAP clientimplements the SOAP protocol on the client site

    Requestor(SOAP client)Web Service Provider(endpoint)HTTP serverSOAP serverapplication serverSOAP messages(http transport)

    The implementation of web services (in runtime) requires in particular the support of the SOAP protocol on the server and the client site. At the server this support is provided by a SOAP server that uses the HTTP server for transporting SOAP messages. The applications implementing the service can be implemented in any implementation platform, ranging from simple programming languages to application services, that support a web service front-end. It is irrelevant what exactly the interface between the SOAP server and application server is and to which degree exposing applications as web services is automated (e.g. whether web services can be automatically generated from application server components such as EJBs). These solutions are vendor-specific.

  • Down to earth example: Amazon Web worlds largest product database through Web ServicesCounterintuitive strategy? (cf. Google)Idea: let others figure out how to sell products for usAssociates program enables Web sites to link to and earn referral feesBy November 2004: 65000 developersSome interesting

  • 2. SOAP Simple Object Access ProtocolLightweight messaging framework based on XMLSupports simple messaging and RPCSOAP consists ofEnvelope construct: defines the overall structure of messagesEncoding rules: define the serialization of application data typesSOAP RPC: defines representation of remote procedure calls and responsesBinding framework: binding to protocols such as HTTP, SMTPFault handlingSoap supports advanced message processing:forwarding intermediaries: route messages based on the semantics of messageactive intermediaries: do additional processing before forwarding messages, may modify message

    SOAP defines the protocol by which web services can be invoked. It supports both simple messaging (as in message queuing approaches) and RPC-style communication. It can be used over any transport protocol layer (such as HTTP, SMTP). SOAP defines the basic structure of messages and encoding rules for data types (used as parameters in procedure/method calls) and the encoding of procedure calls and responses. SOAP also defines bindings to specific transport protocols most notably to HTTP and SMTP.SOAP is designed to also allow the implementation of advanced message processing models, in particular the use of intermediaries. Intermediaries both can just route messages, based on the content of the message, or do some additional processing before routing the message.

  • SOAP MessageSOAP messages consist ofEnvelope: top element of XML message (required)Header: general information on message such as security (optional)Body: data exchanged (required)Headerelements are application-specificmay be processed and changedby intermediaries or recipientBodyelements are application-specificprocessed by recipient only


    The basic structure of a SOAP message consists of a header and a body, both of which the contents are application specific, i.e. not defined by SOAP. The differentiation is made to distinguish information that is to be processed by all intermediaries (Header) and information that is to be processed at the fi