133c49d502fc8258c5bcc4bc05590c1a.ppt
- Количество слайдов: 46
Une (brève) Introduction aux Web Service Les illustrations présentées en quelques-unes de ces slides sont Copyright Springer Verlag Berlin Heidelberg 2004. Elles ont été fourni directement par les auteurs aux buts didactiques/seminariels 14 Dicembre 2006 Rabat (Marocco) 1
(naive) Business-to-Business Integration web serveur client demandes acquisition interne infrastructure interne fournisseur infrastructure interne Interactions B 2 B se passent à travers l'accès aux pages Web (en compilant form Web) ou à travers l'email 14 Dicembre 2006 web serveur infrastructure Interne warehouse Rabat (Marocco) [ACKM 04] 2
Web Service: l’Evolution du Middlewarehouse middleware for supplier-customer interaction middleware for supplier-warehouse interaction middleware for supplier-XYZ interaction another party (XYZ) middleware for supplier-ABC interaction supplier’s adapters fournisseur middleware for integrating the middleware client supplier’s adapters yet another party (ABC) internal infrastructure [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 3
Web Service: l’Evolution du Middleware wide area network (Internet) Web service Company A (provider) Web service client middleware internal service Company B (client) internal service [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 4
(WS-based) Business-to-Business Integration Langages et protocoles standardisés, en éliminant la nécessité de différents middleware (Il est seulement nécessaire le middleware pour Web Service) customer internal procurement requests Web service internal infrastructure Web service supplier internal infrastructure Protocoles d'interaction reprojetés de façon à être peer-to-peer Web service [ACKM 04] Fonctionnalités internes rendues disponibles comme services 14 Dicembre 2006 warehouse internal infrastructure Rabat (Marocco) 5
Deux Architectures (et Middlewares) (1) Company D (client) Company A (provider) Web service client Web service interface Web service Logic for accessing to internal systems internal architecture & middleware internal service logic [ACKM 04] 14 Dicembre 2006 internal service logic Web service external architecture & middleware Web service Company C (provider) Web service Company B (provider) Rabat (Marocco) 6
L’Architecture Interne [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 7
L’Architecture Externe [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 8
Le Middleware Externe [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 9
La moindre infrastructure pour WS service provider service requestor application object (client) application object (service provider) SOAP-based middleware SOAP messages exchanged on top of, HTTP, SMTP, or other transport converts procedure calls to/from XML messages sent through HTTP or other protocols. [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 10
Des Interfaces au Stub/Skeleton <operation name="order. Goods"> <input message = "Order. Msg"/> </operation> WSDL of service provider WSDL compiler (client side) WSDL compiler (server side) service requestor service provider application object (client) application object (service provider) stub skeleton SOAP-based middleware SOAP messages [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 11
Registry [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 12
SOAP (1) SOAP envelope SOAP header block SOAP body block [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 13
SOAP (2) <Product. Item> <name>…</name> <type>…</type> <make>…</make> </Product. Item> <Product. Item name=“…” type=“…” make=“…” /> <Product. Item name=“…” <type>…</type> <make>…</make> </Product. Item> Different encoding styles [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 14
RPC avec SOAP [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 15
Le plus simple SOAP Middleware [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 16
Web Service Definition Language (WS-DL) n Service interface (abstract definition) WS-DL (v 2. 0) fournit un framework pour définir Interfaces: opérations et modèles d'input/output ¨ Spécifiques d'accès: protocol bindings (e. g. , SOAP) ¨ Endpoint: la location du service ¨ 0. . n support 1. . n Interface Operation extend 1. . n specify (how to invoke) 1. . 2 Message Binding 1 consist of 1. . n implement provide Endpoint Part Service 1. . n 14 Dicembre 2006 Rabat (Marocco) Service implementation (concrète definition) 17
Message Exchange Patterns (1) input Client input Service in-only (no faults) Client fault Service robust in-only (message triggers fault) fault Client output Service out-only (no faults) 14 Dicembre 2006 Client output Service robust out-only (message triggers fault) Rabat (Marocco) 18
Message Exchange Patterns (2) (1) input Client input Service Client (2) output (? ) output (2’) fault in-out (fault replaces message) in-optional-out (message triggers fault) (2’) fault (2) input Client Service (? ) input Service Client Service (1) output out-in (fault replaces message) out-optional-in (message triggers fault) 14 Dicembre 2006 Rabat (Marocco) 19
Exemple (1) Définition des messages et des modèles formels <definitions … > <types> <element name="List. Of. Song_Type"> <complex. Type><sequence> <element min. Occurs="0" max. Occurs="unbound“ name="Song. Title" type="xs: string"/> </sequence></complex. Type> </element> <element name="Search. By. Title. Request"> <complex. Type><all> <element name="contained. In. Title“ type="xs: string"/> </all></complex. Type> </element> <element name="Search. By. Title. Response"> <complex. Type><all> <element name="matching. Songs“ xsi: type="List. Of. Song_Type"/> </all></complex. Type> </element> 14 Dicembre 2006 Rabat (Marocco) 20
Exemple (2) <element name="Search. By. Author. Request"> <complex. Type><all> <element name="author. Name“ type="xs: string"/> </all></complex. Type> </element> <element name="Search. By. Author. Response"> <complex. Type><all> <element name="matching. Songs“ xsi: type="List. Of. Song_Type"/> </all></complex. Type> </element> <element name="Listen. Request"> <complex. Type><all> <element name="selected. Song“ type="xs: string"/> </all></complex. Type> </element> 14 Dicembre 2006 Rabat (Marocco) 21
Exemple (3) <element name="Listen. Response"> <complex. Type><all> <element name="MP 3 file. URL" type="xs: string"/> </all></complex. Type> </element> <element name="Error. Message"> <complex. Type><all> <element name="cause" type="xs: string"/> </all></complex. Type> </element> </types> 14 Dicembre 2006 Rabat (Marocco) 22
Exemple (4) Définition de l'interface <interface name="MP 3 Service. Type"> <operation name="search_by_title" pattern="in-out"> <input message="Search. By. Title. Request"/> <output message="Search. By. Title. Response"/> <outfault message="Error. Message"/> </operation> <operation name="search_by_author" pattern="in-out"> <input message="Search. By. Author. Request"/> <output message="Search. By. Author. Response"/> <outfault message="Error. Message"/> </operation> <operation name="listen" pattern="in-out"> <input message="Listen. Request"/> <output message="Listen. Response"/> Définition d'une <outfault message="Error. Message"/> opération </operation> </interface> </definitions> 14 Dicembre 2006 Rabat (Marocco) 23
UDDI Data Structures [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 24
Registry e non Repository overview. Doc (refer to WSDL specs and to API specs) <t. Model. Key=”uddi: uddi. org: v 3_publication”> <name>uddi-org: publication_v 3</name> <description>UDDI Publication API V 3. 0</description> <overview. Doc> <overview. URL use. Type=”wsdl. Interface”> http: //uddi. org/wsdl/uddi_api_v 3_binding. wsdl# UDDI_Publication_Soap. Binding </overview. URL> </overview. Doc> <overview. URL use. Type=”text”> http: //uddi. org/pubs/uddi_v 3. htm#Pub. V 3 </overview. URL> </overview. Doc> classification information (specifies that this t. Model is about XML, WSDL, and SOAP specs) [ACKM 04] 14 Dicembre 2006 <category. Bag> <keyed. Reference key. Name=”uddi-org: types: wsdl” key. Value="wsdl. Spec" t. Model. Key="uddi: uddi. org: categorization: types”/> <keyed. Reference key. Name=”uddi-org: types: soap” key. Value="soap. Spec" t. Model. Key="uddi: uddi. org: categorization: types”/> <keyed. Reference key. Name=”uddi-org: types: xml” key. Value="xml. Spec" t. Model. Key="uddi: uddi. org: categorization: types”/> <keyed. Reference key. Name=”uddi-org: types: specification” key. Value="specification" t. Model. Key="uddi: uddi. org: categorization: types”/> </category. Bag> </t. Model> Rabat (Marocco) 25
UDDI e WSDL [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 26
UDDI API <? xml version="1. 0"? > <find_t. Model generic="1. 0" xmlns="urn: uddi-org: api"> <category. Bag> <keyed. Reference t. Model. Key="UUID: C 25893 AF-1977 -3528 -36 B 5 -4192 C 2 AB 9 E 2 C" key. Name="uddi-org: types" key. Value="wsdl. Spec"/> <keyed. Reference t. Model. Key="UUID: A 15019 C 5 -AE 14 -236 C-331 C-650857 AE 0221" key. Name="book pricing" key. Value="36611349"/> </category. Bag> [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 27
Tout Ensemble [ACKM 04] 14 Dicembre 2006 Rabat (Marocco) 28
La "Pile" des Web Service Registry/Repository & Discovery Multiple Interacting Services Single Service Messaging WSDL-based 14 Dicembre 2006 eb. XML-based Rabat (Marocco) Semantic-based 29
Includes 3 specifications: (i) Web Service Context (WS-CTX) (ii) Web Service Coordination Framework (WS-CF) (iii) Web Service Transaction Management (WS-TXM) La "Pile“ basée sur WSDL repository & discovery UDDI Formerly BPEL 4 WS (BPEL for short) WS-Transaction WS-Coordination WS Composite Application Framework (WS-CAF) WS-CDL (i) formerly also WSEL (Web Service Endpoint Language) by IBM (ii) also the research/accademic proposal Web Service Offering Language [WSOL] WS-BPEL choreography WSCI BPML WSFL, XLANG WSCL, CS-WS WS-Policy, WSLA transaction management Both the Web Service Conversation Language (WSCL, by HP) and Conversation Support for Web Services (CS-WS, by IBM) proposals are no more supported WS-DL orchestration conversation description / interaction protocol non-functional features, Qo. S description (interface definition) WS Reliable Messaging WS-Routing, WS-Addressing XML Protocol – XMLP (SOAP) XML & XML Schema, … 14 Dicembre 2006 HTTP, SMTP, … Rabat (Marocco) advanced messaging basic messaging content transport 30
Composition n Il s'occupe de l'implémentation d'une application (à son tour offerte comme Web Service) dont la logique applicative se base sur l'invocation d'opérations offertes par d’autres services ¨ Le nouveau service est un service composé (composite service) ¨ Les services invoqués sont les services composants (component services) 14 Dicembre 2006 Rabat (Marocco) 31
Un Middleware pour la Composition Through the development environment, a composition schema is synthesized, either manually or (semi-)automatically. A service composition model and a language (maybe characterized by a graphical and a textual representation) are adopted Orchestration: the run-time environment executes the composite service business logic by invoking other services (through appropriate protocols) Web service composition middleware development environment run-time environment (orchestration engine) composition schema definitions composition schema designer composite service execution data other Web Services middleware (e. g. , SOAP invocation engine) [ACKM 04] Composite service provider 14 Dicembre 2006 Rabat (Marocco) Component services offered by other providers Supplier WS Warehouse WS Accounting WS 32
Business Process Execution Language for Web Services (WS-BPEL) n Processus de business comme coordination de Web Service ¨ Processus de business comme Web Service Client of the composite service Il permet la spécifique des compositions schéma de Web Service composé ¨ n n Il permet la spécifique soit des processus abstraits soit des processus exécutables Influencé par ¨ ¨ ¨ n Modèles traditionnels pour les flux Plan structuré WSFL ET XLANG Activity A Activity B Activity C Les services composants sont décrits en WS-DL (v 1. 1) 14 Dicembre 2006 Rabat (Marocco) 33
WS-BPEL Specification n Document XML qui décrit: ¨ ¨ Rôles qui échangent les messages Les interfaces (WSDL) soutenues par chaque rôle ¨ L'orchestration du processus Variables et transformations sur les données n Exception handling n Corrélations n 14 Dicembre 2006 Rabat (Marocco) 34
Modèle du processus (Activités) n n Primitive ¨ invoke: to invoke a Web Service (in-out) operation ¨ receive: to wait for a message from an external source ¨ reply: to reply to an external source message ¨ wait: to remain idle for a given time period ¨ assign: to copy data from one variable to another ¨ throw: to raise exception errors ¨ empty: to do nothing A link connects exactly one source activity S to exactly one target Structured activity T; T starts only after S ends. ¨ sequence: sequential order An activity can have multiple incoming (possibly with join conditions) and ¨ switch: conditional routing outgoing links. Links can be guarded ¨ while: loop iteration ¨ pick: choices based on events ¨ flow: concurrent execution (synchronized by links) ¨ scope: to group activities to be treated “transactionally” (managed by the same fault handler, within the same transactional context) 14 Dicembre 2006 Rabat (Marocco) 35
14 Dicembre 2006 Rabat (Marocco) 36
Security Standards (1) WS-Secure. Conversation WS-Federation WS-Authorization WS-Trust WS-Privacy WS-Policy Attachments WS-Policy Assertions & WS-Security Policy Assertions WS-Security Basic standars, directly defined over SOAP / WSDL 14 Dicembre 2006 Rabat (Marocco) 37
Security Standards (2) n “Secure” Channel ¨ Provides the abstraction of “secure & confidential” communication channel n n XML Digital Signature: to sign parts of XML documents (and therefore parts of the messages exchanged between client and WS) XML Encryption: to cypher parts of XML Documents XML Key Management Services: the interface of basic Web Services for processing and management of keys based on PKI WS-Security: integrity and confidentiality end-to-end of messages 14 Dicembre 2006 Rabat (Marocco) 38
Security Standards (3) n Description of Features The WS-Policy family allows the description of requirements and capabilities of a WS, in order to provide clients with needed information ¨ WS-Policy. Attachment: to link assertions to a WS ¨ WS-Policy. Assertions and WS-Security. Policy. Assertions are the languages for expressing such assertions ¨ n Trust WS-Trust defines a model for establishing trust between client and WS, based on third parties (Security Token Services – to be realized as infrastructural services) ¨ Definition of protocols and interfaces for verifying authenticity and freshness of the tokens presented by the subjects ¨ n Secure Conversations ¨ n WS-Secure. Conversation: mechanisms for establishing and exchanging security contexts, to be used during exchanges of messages belonging to the same conversation Others (not yet mature) ¨ ¨ ¨ WS-Privacy WS-Authorization WS-Federation 14 Dicembre 2006 Rabat (Marocco) 39
Security Standards (4) n SAML (Security Assetion Markup Language) ¨ XML framework for exchanging authentication and authorization information for securing Web services n XACML (e. Xtensible Access Control Markup Language) ¨ XML framework for specifying access control policies for Web-based resources 14 Dicembre 2006 Rabat (Marocco) 40
eb. XML n eb. XML is more a standardized “conceptual framework”, a “reference model”, than a real stack of standard technologies ¨ Stable version in 2001/2002 n n n n Technical Architecture Specification (v 1. 04) Business Process Specification Schema (v 1. 01) Registry Information Model (v 2. 0) Registry Services Specification (v 2. 0) Requirements Specification (v 1. 06) Collaboration-Protocol Profile and Agreement Specification (v 2. 0) Message Service Specification (v 2. 0) Currently in revision ¨ Indeed, many Technical Committees (TCs) are working in synergy with the promoters of the W 3 C/WSDLbased “stack” n E. g. , UDDI v 2 has been developed in the context of eb. XML/OASIS, currently WS-BPEL and WS-CAF are being evolved/developed in the context of specific TCs, etc. 14 Dicembre 2006 Rabat (Marocco) 41
eb. XML: Aims n To define an open & public infrastructure, based on XML, for distributed electronic commerce ¨ Special attention to SMEs and developing countries Business Process, Core Components Registry/ Repository Process Definition Partner Discovery Process Evolution Process Management Electronic Business Collaboration Process Execution Partner Sign-up Electronic Plug-in Message Service, Business Service Interface 14 Dicembre 2006 Collaboration Protocol Profile Rabat (Marocco) Collaboration Protocol Agreement Business Service Interface 42
eb. XML: Comment ? by using BPSS (Business Process Specification Schema) Business Process and Information Models (compliant to the Meta Model) Model to XML Conversion register Registries retrieve profiles & new/updated models Registry Service Interface Collaboration Protocol Profile (CPP) register Business Service Interface Internal Business Application derive 14 Dicembre 2006 build retrieve models and profiles implementers govern exchange Collaboration Protocol Profile (CPP) build govern Collaboration Protocol Agreement (CPA) govern Rabat payload (message)(Marocco) derive register exchange Business Service Interface Internal Business Application in a sense, this is the “maximum intersection” choreography 43
eb. XML: BPSS, CPP e CPA (1) n BPSS is used for modeling a business process, thus obtaining a BPS (Business Process Specification) ¨ Partners, roles, collaborations and document exchanges (business transactions) ¨ Collaboration: set of activities; an activity is a business transaction or again a collaboration ¨ Business transaction: a partner is the requester, the other is the responder, in a business document flow n CPP: expresses the capabilities of a partner in partecipating in a BPS 14 Dicembre 2006 Rabat (Marocco) 44
eb. XML: BPSS, CPP e CPA (2) n n A wants to make electronic business with B; A is the acquirer and B the vendor; the process underlying the business is already defined in a BPS A discovers the B ’s CPP in a registry A CPA is created, as the intersection of A ’s CPP and B ’s CPP On the basis of the CPA, the A ’s and B ’s business service interfaces are configured in order to support the business transactions 14 Dicembre 2006 Rabat (Marocco) 45
eb. XML: BPSS, CPP e CPA (3) (5) B’s server n CPPB n (1) Registry n (3 - 4) (2) (6) CPPX CPPY n CPPZ CPAA and B A’s server (5) 14 Dicembre 2006 (1) n CPPA n Each partner has registered its own CPP in the registry Partner A discovers B in the registry and download CPPB on its system Partner A creates CPAA and B and sends it to B After a negotiation (both manual or automatic), both A and B register identical copies of the agreed upon CPAA and B in their systems Both A and B configure their systems for runtime on the basis of CPAA and B Finally A and B engage their e -Commerce process Rabat (Marocco) 46
133c49d502fc8258c5bcc4bc05590c1a.ppt