360 likes | 454 Views
Web Services and KDD Humboldt-Universität zu Berlin 06.06.2005. AGENDA . 1. Introduction to Web Services. 2. Using Existing Web Services. 3. Writing your own Web Services. 1 Introduction to Web Services. >> What a WS tells about WS. http://wortschatz.uni-leipzig.de/.
E N D
Web Services and KDDHumboldt-Universität zu Berlin06.06.2005
AGENDA 1 Introduction to Web Services 2 Using Existing Web Services 3 Writing your own Web Services
1 Introduction to Web Services >> What a WS tells about WS http://wortschatz.uni-leipzig.de/
1 Introduction to Web Services >> What are Web Services (1) • Several definitions exist, focusing on different aspects of WS. • Examples: • “Web Services are self-contained, modular applications that can be described, published, located, and invoked over a network, generally, the World Wide Web.” [IBM, 2000] • “Web Services are a new, standards-based approach to build integrated applications that run across an intranet, extranet, or the Internet. The approach represents a major evolution in how systems connect and interact with each other.” [IBM and Unisys, 2001] • “A Service, any service, can be defined as a software component that can be:- Described in a formal language- Published to a registry of services- Discovered through standard mechanisms- Invoked over a network- Composed with other services” [Computer Associates, D. Tcherevik]
1 Introduction to Web Services >> What are Web Services (2) • Examples (continued): • “Web Services are Services, that can be reached over the Web.”[Dieter Fensel] • “A Web service is, simply put, application functionality made available on the World Wide Web.” [Sun] • “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.” [Microsoft] • “A Web service is a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP-messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards.” [W3C]
1 Introduction to Web Services >> Working definition • Working definition of a Web Service: • A Web Service is a software system that is identified by an URI, and whose public interfaces and protocol bindings are defined and described in XML. • These definitions can be determined and sourced by other software systems that can then interact with the WS according to its published interface definitions. • These interactions are carried out by exchanging XML-based messages that are transmitted by means of Internet protocols. • [Mario Jeckle], [W3C Web Services Architecture Working Group]
1 Introduction to Web Services >> Why do we need services ? • Several concepts of distrib. comp. existed before the emergence of WS • Missing standards made interoperability impossible • Object technologies were different • Only clients built on the same technology could communicate • Some past standards: DCOM CORBA Java RMI RPC Protocol RPC IIOP IIOP or JRMP Message Format NDR CDR Java Ser. Format Description IDL OMG IDL Java Discovery Windows Registry Naming Service RMI Registry or JNDI
1 Introduction to Web Services >> From Objects to Services • The artefact ‘object’ is always linked to a platform • Interoperability thus requires to abstract from objects • A service can be used without knowing the platform on which it runs andwithout knowing in which programming language it is implemented • Abstraction levels Abstraction level Service Component Object Procedure t
1 Introduction to Web Services >> Service Orientation • Benefits from abstraction • technology and vendor lock-in effects can be diminished • extensibility and convertibility are important • thus: systems should not rely on • platforms • programming languages • objects • RPCs • Service orientation is technically justified !
1 Introduction to Web Services >> Services and SOA • The “Service” in WS refers to classic concepts. • Services are actions that are executed on a third party’s behalf. • They do not produce a physical good. • Their character is solely defined by the supply itself. • The Service-Oriented Architecture (SOA) • Important characteristics: • XML based • URI usage for referencing and identification of services • use of an established Internet infrastructure (ISO-OSI protocol hierarchy) • Implied fundamental subsystems • XML-based protocol for data representation and exchange • XML-based description language for publishing interface descriptions • Service for managing the published interfaces
1 Introduction to Web Services >> Service-Oriented Architecture • SOA comprises • abstraction • decoupling • interoperability • Four principles • explicit borders • autonomous services • services share schemata and contractsbut not implementations • compatibility between services is negotiated by policies
1 Introduction to Web Services >> WS in a Service-Oriented Architecture • Web Services conform with these principles: • stand. communication protocols • stand. data coding formats • stand. description languages • stand. discovery mechanisms • Recall: Definition of a Web Service • software application that communicates over open Internet protocols, • processes XML messages with respect to its SOAP specification, • describes messages by means of XML schemata, • supplies an interface description based on WSDL, • can be found by UDDI
1 Introduction to Web Services >> Creating and bridging borders: Communication via interfaces communictionspec: Contract data public interfacespec: Schema data P2 P1 DB
1 Introduction to Web Services >> Roles in the Service-Oriented Architecture • The SOA comprises three typical roles: • Service Provider • physical supply of the service(i.e. URI-reachable implementation and publication) • documentation of the interface • Service Requester • uses the service by exchange of XML-coded messagesover Internet protocols • additionally, can fetch the service description from a public repository • Service Directory / Service Broker • administers the service interface descriptionsthat are published by the service suppliers • offers discovery functionalities
1 Introduction to Web Services >> Activities in a Service-Oriented Environment • Essential activities need to happen in any service-oriented environment • A Web Service needs to be … • created, and its interfaces and invocation methods must be defined. • published to one or more repositories for potential users to locate. • located to be invoked by potential users. • invoked to be of any benefit. • unpublished when it is no longer available or needed. (optional)
publish find bind 1 Introduction to Web Services >> Operations in a Service-Oriented Architecture • A Web Services architecture then requires three fundamental operations: • publish: Service providers publish services to a service broker. • find: Service requesters find required services using a service broker. • bind: Service requesters bind to found services. Service Broker Service Provider Service Requester
1 Introduction to Web Services >> Implementing the SOA operations • Three standards emerged to implement the described operations • SOAP • Communication protocol for the communication between the service provider and the service requester • WSDL (Web Service Description Language) • XML-based interface description language • UDDI (Universal Service Description, Discovery and Integration) • Directory service for administration of interface descriptions, that is itself realized as a web service
1 Introduction to Web Services >>Web Services Basic Profile (WS-I) UDDI Directory of endpoints WSDL Endpoint descriptions XSD Portable type system SOAP Envelope for messages XML 1.0 + Namespaces Serialized messages “Wire” protocols Description languages “Discovery” mechanisms
1 Introduction to Web Services >> SOAP brief history • SOAP 0.9 [August 1999] is seen to mark the beginning of the WS era • The goal is twofold: • interoperability • integration • SOAP 1.1 [May 2000] is the first usable specification • Simple Object Access Protocol (SOAP) 1.1 (33 pages) • SOAP 1.2 [June 2003] is the latest version of the recommendation • Specification is split in four parts (a total of 350 pages) • Only the acronym is used to name the specification, as the terms “simple”, “object”, “protocol” suggest a wrong idea
1 Introduction to Web Services >> SOAP • SOAP 1.1 • abstraction from the transport protocol • synchronous and asynchronous messages • SOAP message • XML-coded • consists of two parts • message heads • one or more optional heads • containing meta-information • message body • transmission of the usage data • outmost element is the SOAP-envelope
1 Introduction to Web Services >> SOAP message • Example of SOAP message (1) <env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"> (2) <env:Header> (3) <n:alertcontrol xmlns:n="http://example.org/alertcontrol"> (4) <n:priority>1</n:priority> (5) <n:expires>2001-06-22T14:00:00-05:00</n:expires> (6) </n:alertcontrol> (7) </env:Header> (8) <env:Body> (9) <my:message xmlns:my="http://www.mycompany.com"> (10) <my:text>Hello World!</my:text> (11) </my:message> (12) </env:Body> (13) </env:Envelope>
1 Introduction to Web Services >> SOAP message head and body • SOAP message head • contains administrative data • routing, user data, encrypted passwords • not only intended for the recipient of the message • evaluation is optional (unless otherwise stated) • own namespaces can be added • SOAP message body • contains data to be exchanged between the partners • formal parameters, return values, one-way messages • named parameters are written as elements (name = tag)
exchanged data 1 Introduction to Web Services >> SOAP message body (1) • Example of SOAP message body (request) (1) <?xml version="1.0" encoding="UTF-8"?> (2) <env:Envelope (3) xmlns:env="http://www.w3.org/2003/05/soap-envelope" (4) xmlns:b="http://www.example.org/AddService> (5) <env:Body> (6) <b:add env:encodingStyle="http://www.w3.org/2003/05/soap-encoding"> (7) <b:a>2</b:a> (8) <b:b>3</b:b> (9) </b:add> (10) </env:Body> (11) </env:Envelope>
1 Introduction to Web Services >> SOAP message body (2) • SOAP message body elements • parameters • each named parameter is coded by one element • element name = parameter name • service • the called service is the parent element for all its parameters • namespaces • all user-defined parts of the body must be expressed in auser-defined namespace • separation from standard elements • validation against schema should be possible • data structure is service-dependent and cannot be covered by the SOAP standard • SOAP standard only indicates encoding
1 Introduction to Web Services >> SOAP message body (3) • Example of SOAP message body (response) (1)<?xml version="1.0" encoding="UTF-8"?> (2)<env:Envelope (3) xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" (4) xmlns:b="http://www.example.org/AddService"> (5)<env:Body> (6) <b:result env:encodingStyle="http://www.w3.org/2003/05/soap-encoding">5</b:result> (7) </env:Body> (8) </env:Envelope>
1 Introduction to Web Services >> WSDL • WSDL - Web Service Description Language • Describing the Web Service’s interface • The WS concept does not require the disclosure of service interfaces • NB: CORBA or DCOM do require a disclosure • Publishing a machine-readable service description is reasonable • IDE can generate a call framework out of the WSDL • WSDL documents can be generated automatically • normally, a programmer should not manually code a WSDL document
1 Introduction to Web Services >> WSDL descriptions • WSDL descriptions • are XML documents • WSDL is XML-schema based vocabulary • WSDL is structured in six parts • Service: general description of the provided service • Operations: description of the provided operations • Messages: signatures of the messages (requests and responses) • PortTypes: linking operations and messages • Bindings: linking operations to a transport protocol • Types: definition of user-defined parameter and return value types
1 Introduction to Web Services >> UDDI • UDDI - Universal Service Description, Discovery and Integration • designed to find Web Services • operated as a SOAP-based WS • Role of UDDI in the SOA • WSDL described the technical WS characteristics • human-readable descriptions of the WS are not covered by WSDL • the storage and retrieval of WSDL-documents is not covered by WSDL • a preferred (or at least reasonable) location where WSDL documents are stored and can be fetched from is missing • UDDI as a directory • Service Providers publish / register their services • Service Requestors can find an appropriate service • Main problem: lack of semantics
1 Introduction to Web Services >> UDDI is standardized by OASIS • UDDI • standardized and managed by OASIS • February 2005: UDDI v3.0 ratified as OASIS Standard • OASIS • Organization for the Advancement of Structured Information Standards • not-for-profit, international consortium • drives the development, convergence, and adoption of e-business standards • the consortium produces open standards for WS, security, e-business • standardization efforts in the public sector and for application-specific markets • (Industry) Members • set the OASIS technical agenda themselves • founded in 1993, OASIS has more than 4,000 participants
1 Introduction to Web Services >> UDDI structure and functionalities • Business Entity: offering Service Provider • listing of service providers as in yellow pages • contact information, firm data and other meta data • Business Service: offered service • one or more Business Services can be associated to a Business Entity • tModel: description of the offered service (technical model) • can incorporate a WSDL document or any other user-defined characteristics describing the service • can associate the service to a service category, allowing catalogue browsing • BindingTemplate: linking tModel and Business Service • all tModels of a Business Service are linked to the latter by BindingTemplates
1 Introduction to Web Services >> So far for the specifications printed pages of WS specifications
Messaging WS-Addressing WS-Eventing MTOM Reliability WS-ReliableMessaging Security WS-Security WS-Trust WS-SecureConversation WS-Federation Transactions WS-Coordination WS-AtomicTransaction WS-BusinessActivity Metadata WS-Policy WS-PolicyAssertions WS-PolicyAttachment WS-SecurityPolicy WS-Discovery WS-MetadataExchange 1 Introduction to Web Services >> Selected Specifications
1 Introduction to Web Services As of May 2002 >> The Web Service Hype Cycle Real Peak of InflatedExpectations Visibility Start of Media Infatuation Plateau ofProductivity Trough of Media Distraction Slope ofEnlightenment TechnologyTrigger Trough ofDisillusionment Time 1999 2000 2001 2002 2003 2004 2005
As of August 2003 Visibility Key: Time to Plateau Web Services for SCM Web Services Security Less than two years Standards Web-Services-Enabled Business Models Two to five years Web Services for BPM Web Services for CRM Five to 10 years Web Services for Remote Portals Secure Web Services External SOAP Web Services Deployments XML Internal Web Services Over Web Portals as Web Networks HTTP Services Services WSDL Consumers Web Services Brokers XML Veneer Approach UDDI Web Services Operations Managers Maturity Peak of Inflated Trough of Slope of Plateau of Technology Expectations Disillusionment Enlightenment Productivity Trigger 1 Introduction to Web Services >> Maturity of the WS specifications
AGENDA 1 Introduction to Web Services 2 Using Existing Web Services 3 Writing your own Web Services
AGENDA 1 Introduction to Web Services 2 Using Existing Web Services 3 Writing your own Web Services