Title: Verlesung%20
1VerlesungInformationssysteme Neuere Konzepte
Web Services
Michael Klein kleinm_at_ipd.uni-karlsruhe.de http//w
ww.michaelklein.net/nki
2Übungsblätter
- Zunächst
- Besprechung der 3 Übungsblätter
3VerlesungInformationssysteme Neuere Konzepte
Web Services
Michael Klein kleinm_at_ipd.uni-karlsruhe.de http//w
ww.michaelklein.net/nki
(Folien teilweise auf englisch)
4Szenario (1)
Telefongesellschaft
Telefon- anschluss?
Auftrag
5Szenario (2)
Anschluss verfügbar?
nein
ja
Geschäftsprozess
Reservierung der Nummer
ja
Auftrag
Eintrag Telefonbuch
Eintrag?
Telefongesellschaft
nein
ok
Einkauf Endgeräte
Versand Endgeräte
Prob
Einzug Anschlussgebühren
Entschuldigungs-schreiben
6Dienstorientierte Architektur
Geschäftsprozess
- Nutzung von Funktionalität externer Entitäten
über Dienste
Funktionalität A
Funktionalität B
Dienst- geber 3
Dienst- geber 5
Funktionalität A
Dienst- geber 1
Funktionalität A
Dienst- geber 2
? Funktionalität kann evtl. kostengünstig
ausgelagert werden.
7Service Oriented Computing
- Network not as collection of documents but as a
collection of functionality - Applications and business processes use
functionality of other entities - especially interesting
- in mobile networks with limited capabilities
- in the internet large companies, many services ?
outsourcing - Integration of distributed functionality across
organizational and network boundaries
8Characteristics of SOC
- Characteristics
- Functionality is hidden behind an interface
- Offered functionality is publicly described
- Service public functionality that can be
published, discovered, and executed across the
network(client-server paradigm)
9General Process the Service Triangle
9. execute
Requestor (Client)
Provider (Server)
3. describe request
1. describe offer
5. match
Repository
10Service Description Language
Service Requests
Service Requests
11Web Services
12What is a Web Service?
Web Service
xml
xml
- Web Service
- service that Accessible through the internet
- consumes and produces xml documents
- is uniquely identified by an uri
- Based on three main technologies
- WSDL Web Service Description Language
- SOAP Simple Object Access Protocoll
- UDDI Universal Description, Discovery and
Integration
13Task of the Technologies
9. execute
Requestor (Client)
Provider (Server)
SOAP
3. describe request
1. describe offer
WSDL
WSDL
5. match
Repository
UDDI
- automatic prematching based on categories
- manual matching and selecting
- static binding
14WSDL, SOAP, and UDDI
- WSDL
- to describe the functionality of a service
- helps to find an appropriate service
- helps to invoke a found service correctly
- UDDI
- directory service
- is itself a service
- helps to get an overview of the services in the
repository - only helpful in case of very many services
- SOAP
- communication protocol between service requestor
and provider - helps to transfer simple (atomic) and complex
(composite) data - ? All based on XML
15Web Service Stack
Communication
Description
Discovery
SOAP
Semantics
XML
WSDL Extensions
UDDI
HTTP
WSDL
XML
TCP/IP
XML
Task provide a standard, flexible way to
discover where a Web service is located .
Task provide a standard, flexible way to
describe what and how a Web service does what it
does.
Task provide a standard, flexible
communications channel
16WSDL
17History of WSDL
NASSL SDL/SCL
2000 Microsoft, IBM and Ariba jointly issue WSDL
1.0
2001 A dozen companies submit WSDL 1.1 as W3C
Note
2002 W3C publishes WSDL 1.2 as Working Draft
2003 WSDL is separated into three parts core,
messages, bindings
2004 WSDL 2.0 (mainly renamings)
18WSDL 1.2 Components as UML Diagram
service publicly callable functionality
ABSTRACT
message collection of information that can be
exchanged via network
CONCRETE
operation function that processes an input
message and returns an output message
19Types
- defines important datatypes
- primitive types from XML schema
- complex types buildable via ltcomplexTypegt-Tag
lttypesgt ltschema targetNamespace"http//example
.com/stockquote.xsd" xmlns"http//www.w3.o
rg/2000/10/XMLSchema"gt ltelement
name"TradePriceRequest"gt ltcomplexTypegt
ltallgt ltelement
name"tickerSymbol" type"string"/gt
lt/allgt lt/complexTypegt lt/elementgt
ltelement name"TradePrice"gt
ltcomplexTypegt ltallgt
ltelement name"price" type"float"/gt
lt/allgt lt/complexTypegt lt/elementgt
lt/schemagt lt/typesgt
20Messages
- combines types to abstract messages
- smallest interchangeable units
- unidirectional
- built up from parts
ltmessage name"GetLastTradePriceInput"gt ltpart
name"body" element"xsd1TradePriceRequest"/gt
lt/messagegt ltmessage name"GetLastTradePriceOutpu
t"gt ltpart name"body" element"xsd1TradePrice"
/gt lt/messagegt
21Operation and PortType
- Operation is abstract functionality that
- receives an input messages
- processes it
- send set an output and fault messages
- PortType groups operations to interfaces
ltportType name "StockQuotePortType"gt
ltoperation name "GetLastTradePrice"gt
ltinput message "tnsGetLastTradePriceInput"/gt
ltoutput message "tnsGetLastTradePriceO
utput"/gt lt/operationgtlt/portTypegt
22Operation Types
- One-way operationsinput only
- Request-Responseinput, then output(default)
- Solicit-Responseoutput, then input
- Notificationoutput only
client
server
client
server
client
server
client
server
23Binding
- Connects abstract PortTypes with concrete Ports
- Defines concrete message syntax
- Defines concrete communication protocol details
- Most important protocol SOAP
- Simpler protocols like HTTP GET/POST possible
ltbinding name"StockQuoteBinding
type"tnsStockQuotePortType"gt ltsoapbinding
style "document" transport
"http//schemas.xmlsoap.org/soap/http"/gt
ltoperation name "GetLastTradePrice"gt
ltsoapoperation soapActionhttp//example.com/Get
LastTradePrice"/gt ltinputgt
ltsoapbody use "literal"/gt lt/inputgt
ltoutputgt ltsoapbody use
"literal"/gt lt/outputgt
lt/operationgt lt/soapbindinggtlt/bindinggt
24Port and Service
- Port specifies a concrete address of a binding
- Service is a collection of such ports
ltservice name"StockQuoteService"gt ltport
name"StockQuotePort" binding"tnsStockQuoteBindi
ng"gt ltsoapaddress
location"http//example.com/stockquote"/gt
lt/portgtlt/servicegt
25Components of WSDL 1.2 Summary
ABSTRACT
CONCRETE
26Renamings in WSDL 2.0
WSDL 1.2
WSDL 2.0
Port
Endpoint
PortType
Interface
Message
no special tag. Directly defined by xselement
and xscomplexType
Part
no special tag. Directly defined by xssequence
and xselement
27Example for Changes in WSDL 2.0
lttypesgt ltxsschema xmlnsxs"http//www.w3.org/2
001/XMLSchema targetNamespace"http///sche
mas/resSvc.xsdgt ltxselement
name"checkAvailability type"tCheckAvailability"
/gt ltxscomplexType name"tCheckAvailab
ility"gt ltxssequencegt
ltxselement name"checkInDate"
type"xsdate"/gt ltxselement
name"checkOutDate" type"xsdate"/gt
ltxselement name"roomType"
type"xsstring"/gt
lt/xssequencegt lt/xscomplexTypegt
ltxselement name"checkAvailabil
ityResponse" type"xsdouble"/gt
ltxselement name"invalidDataError"
type"xsstring"/gt lt/xsschemagt lt/typesgt
Message
Part
28WSDL
29Matching
- Task
- Given a service description for a requested
service r and a service description of an offered
service o. Question Is o suitable to fulfill
rs needs? To what degree? - Idea
- Matcher compares o and r and calculates matching
value in 0,1 - 0.0 o is not suitable at all
- 1.0 o is perfectly suitable
- intermediate values o is suitable to the given
degree
30Matching WSDL Descriptions Approaches
- (1) Keyword based Search
- Request r is set of keywords.
- ? Matching value is only a hint
- ? Manual postprocessing and selection necessary
- (2) Type based Matchers
- Check whether input message of request provides
more information than input message of offer - Check whether output message of request wants
less information than output message of offer - wants less
- each type in the request has to appear in the
offer - types of the offer have to be a subtype of the
desired types in the request
31Type based Matcher
Request r
Offer o
ir_1
io_1
or_1
oo_1
Service
Service
ir_n
io_k
or_m
oo_l
- For each or_i in r Is there a oo_j in o with
oo_j subtypeof or_i - For each io_i in o Is there a ir_j in r with
ir_j subtypeof io_i
32Problems with WSDL Matching
Message oriented service description
incomingmessages
outgoingmessages
Service
- Problems
- Not really new. Already in CORBA, DCOM, EJB,
ebXML, - ? No advantage to pure interface description
- Semantics not clearFunctionality has to be
guessed from flow of information - ? What does a service, that requests a String
and outputs an Integer? - ? automatic selection difficult
- Strict message compatibilityIf messages between
provider and requestor do not match, the service
cannot be used
33WSDL
34Tools for WSDL
- Integration in Programming Languages
- Microsoft .NET
- Sun Java Web Service Development Pack
- XML Processing, SOAP Binding, XML Registry
- Web Services Toolkit (WSTK) von IBM
- Plugins for Eclipse (WSDL Viewer, WSDL Validator,
) - SOAP for Perl
- NuSOAP SOAP Toolkit for PHP
-
- Tools / Server Components for WSDL
- Axis (SOAP Server)
- IBMs Websphere
- Graphical WSDL editors like CapeClear
- WSDL generators (right-click on method)
- WSDL validators
-
35WSDL in Practice Early Adopters
- amazon.com
- Amazon E-Commerce Service
- Everything but really buy
- ItemLookup, ItemSearch, SimilarityLookup
- CartAdd, CartClear, CartCreate, CartGet,
CartModify - Service requestors need to registers first
- Intended usage including Amazon in own web sites
- ebay.com
- eBay SOAP API
- Offer Items, Place Bids, Search for articles
- google.com
36WS- Language Extension for WSDL
- WS-PolicyFor including non-functional
requirements/assertions in WSDL descriptions - WS-Resource Framework (WSRF)For describing
resources and states on the service provider. - WS-Security (WSS)For securing the usage of web
services - WS-CoordinationFor enhancing WSDL descriptions
by protocols to coordinate the actions of several
participants. Example WS-AtomicTransaction
37Web Service Composition BPEL4WS
subprovider 1
service requestor
service provider
subprovider 2
subprovider 3
BPEL4WS
WSDL
- BPEL4WS Business Process Execution Language
for Web Services - Specification of the Orchestration, i.e. the
coordination between main service and its
subservice providers. - Developed by Microsoft (XLANG) and IBM (WSFL)
38Evaluation of WSDL
- Advantages
- Easy to understand
- Widely accepted
- Rich tool support
- good integration in programming languages
- many extensions
- important early adopters
- upcoming standard for description
- Disadvantages
- Low semantics
- primitive matchers
- not usable for automatic service selection
- designed for static service binding
39AusblickSemantic Web Services
40Dienstorientierte Architektur
Geschäftsprozess
- Nutzung von Funktionalität externer Entitäten
über Dienste
Funktionalität A
Funktionalität B
Dienst- geber 3
Dienst- geber 5
Funktionalität A
Dienst- geber 1
Funktionalität A
Dienst- geber 2
41Dynamic Service Binding
- Dynamic Service Binding
- Advantages
- robust
- context-aware
- network independent
- Most important task automation
- ? Complete process should be automatic
- Important
- Semantic Service Description Language
42Ansätze
- ALLGEMEINVon syntaktischer zu semantischer
Dienstbeschreibung - Einigung auf ein gemeinsames Vokabular ?
Ontologie - Nicht mehr Drucker/Printer/prt/lpt1, sondern
PRINTER - Zusätzlich Beschreibung der Zustandsänderung
durch den Dienst - Welcher Zustand muss vor Dienstausführung gelten?
- Welcher Zustand gilt nach erfolgreicher
Dienstausführung? - Getrennte Anfrage- und Angebotsbeschreibungen
- Anfrager kann Präferenzen in die Anfrage
integrieren - Was muss, was soll, was darf, was könnte etc.
43Gemeinsames Vokabular
- Grundsätzlicher Ansatz
- Rechnerverständlichkeit benötigt gemeinsames
Vokabular - ? Einsatz von Ontologien
Location
Schema
Room
Building
within
Instanzen
room2.14Room
room335Room
geb50.34Building
within
44Typen von Dienstbeschreibungen
eingehende Nachrichten
abgehende Nachrichten
1. Rein nachrichtenbasierte Dienstbeschreibung (z
.B. WSDL)
Dienst
Zustand
Information
45Vorteile
- Vorteile eines gemeinsamen Vokabulars
- Keine unterschiedliche Benennung des gleichen
Sachverhalts - ? Beschreibung ist eindeutig
- ? Computer kann Vergleich selbstständig
durchführen - Allerdings auch Einigungsaufwand
- Vorteile von rein zustandsorientierten
Beschreibungen - Keine explizite Beschreibung von Nachrichten
- ? Einfluss der ausgetauschten Information auf
Zustände klar definiert - ? Dienst können passen, obwohl Informationsfluss
unterschiedlich
46ZUSAMMENFASSUNG
47Zusammenfassung
UDDI
Dienstorientierte Architektur
Web Service
SOAP
WSDL
message-operation-port-service
Semantische Dienstbeschreibung
Vergleich von WSDL-Beschreibungen
abstrakte vs. konkrete Dienstbeschreibung
Dienstverzeichnis
rein zustandsorientierte Dienstbeschreibung
Dynamische Dienstbindung
BPEL4WS
48Thank you for your attention!