Scalable architectures and services for ubiquitous Web access
Web Services andWeb Services and Service-Oriented Architectures
Transcript of Web Services andWeb Services and Service-Oriented Architectures
![Page 1: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/1.jpg)
Web Services andWeb Services and Service-Oriented Architectures
Prof. Dr. Uwe AßmannSebastian Richly
Technische Universität DresdenInstitut für Software- und Multimediatechnik
http://www-st.inf.tu-dresden.de V i 09 0 1 M 12 2009Version 09-0.1, May 12, 2009
CBSE, © Prof. Uwe Aßmann 1
![Page 2: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/2.jpg)
Content
► Web Services as a specific form of service-oriented architectures ► SOAP► SOAP► WSDL► BPEL► OWL-S► Comparison
Prof. U. Aßmann, CBSE 2
![Page 3: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/3.jpg)
Obligatory Reading
► ISC, Chapter 2.4► W M P Van der Aalst Don't go with the flow: Web services► W.M.P. Van der Aalst. Don t go with the flow: Web services
composition standards exposed. IEEE Intelligent Systems, Jan/Feb 2003.http://tmitwww.tm.tue.nl/research/patterns/download/ieeewebflow.pdf
► P. Wohed, W.M.P. Van der Aalst, M. Dumas, A. ter Hofstede. Analysis of Web Service Composition Languages: The Case of BPEL.BPEL.
Prof. U. Aßmann, CBSE 3
![Page 4: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/4.jpg)
Literature
► YAWL► H P Alesso C F Smith Developing Semantic Web Services A K► H. P. Alesso, C. F. Smith. Developing Semantic Web Services. A K
Peters Ltd, Natick, Massachusetts, 2004.► OWL-S definition at http://daml.semanticweb.org/services/owl-s/1.0
Prof. U. Aßmann, CBSE 4
![Page 5: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/5.jpg)
Web Services and Architecture Systems
► Architecture systems may have different forms of architectural languages:g g■ Topology-based (Unicon, ACME, Darwin)■ Coordination schemes (CoSy)
Imperative scripts (Darwin)■ Imperative scripts (Darwin)
► Web Service Systems and Languages (WSS) are a form of architectural system ■ They separate programming-in-the-small from programming-in-the-large (2-level
programming). Components encapsulate the service knowledgep p g. The architectural level (orchestration, aggregation, composition) treats the big
picture
► However WSS have an imperative architectural language► However, WSS have an imperative architectural language
Prof. U. Aßmann, CBSE 5
![Page 6: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/6.jpg)
Reuse of Services
AccountsWeb Agregate Order acceptance
Amazon.com
O d a p a
Billing
Storage
O d i
Billing
Storage
Order processing
BankP k i
Packing
BankPaket service Checking
Prof. U. Aßmann, CBSE 6PaymentDelivery Creditability check
![Page 7: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/7.jpg)
Web Services: Workflows
► Workflow specifications combine control and data flow► Web service architectures are the first step to service-oriented► Web service architectures are the first step to service-oriented
architectures (SOA), based on traders■ Services will be offered, searched and discovered, downloaded, executed
► Enterprise services transfers web services to business systems
DataOperation/Process DataOperation/Process
Prof. U. Aßmann, CBSE 7
![Page 8: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/8.jpg)
Basics: XML-Based Data Exchange
+ W3C Recommendation (standard)
+ Easy syntax for hierarchical t t d d tstructured documents
Widely spread, accepted
No semanticsData: XML-document
- No semantics
- Not compact / low performance
- Ongoing standardizations
Approach Components ofWeb Se ices
- Ongoing standardizations
pp
XML
Web Services
Message Description
Prof. U. Aßmann, CBSE 8
g p
![Page 9: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/9.jpg)
XML Example
<treatment><patient insurer=“1577500”nr=‘0503760072’/><patient insurer= 1577500 nr= 0503760072 /><doctor city=“HD” nr=‘4321’/>
< i ><service><mkey>1234-A</mkey><date>2001-01-30</date><diagnosis>No complications.</diagnosis></service></service>
</treatment>
Prof. U. Aßmann, CBSE 9
![Page 10: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/10.jpg)
XML Types and Regular Expressionsg p
Regular ExpressionType
(X)*ARRAY OF X
(X, Y, ..., Z)RECORD X, Y, ..., Z
(X |Y | |Z)UNIONX Y Z
(X, Y, ..., Z)RECORD X, Y, ..., Z
(X |Y |... |Z)UNIONX, Y, ..., Z
Prof. U. Aßmann, CBSE 10
![Page 11: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/11.jpg)
Example: Definition of Simple Tag Types with XML Schema (XSD)( )
<simpletype name=‘mkey’ base=‘string’><pattern value=‘[0-9]+(-[A-Z]+)?’/><pattern value= [0-9]+(-[A-Z]+)? /></simpletype>
<simpletype name=‘insurer’ base=‘integer’><simpletype name= insurer base= integer ><precision value=‘7’/></simpletype>
<simpletype name=‘myDate’ base=‘date’><minInclusive value=‘2001-01-01’/><maxExclusive value=‘2001-04-01’/>/</simpletype>
Prof. U. Aßmann, CBSE 11
![Page 12: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/12.jpg)
Example: Complex XML Schema typesp yp
<complextypename=‘treatment’><elementname=‘patient’ type=‘patient’/><elementname= patient type= patient />
<choice><elementref=‘doctor’/><elementref= doctor /><elementref=‘hospital’/></choice>
<elementref=‘service’ maxOccurs=‘unboanded’/></complextype>/ p yp
Prof. U. Aßmann, CBSE 12
![Page 13: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/13.jpg)
Example: XML Schema Attributes
<complextypename=‘patient’ content=‘empty’><attributeref=‘insurer’ use=‘required’/><attributeref insurer use required />
<attributename=‘nr’ use=‘required’><simpletypebase=‘integer’><precisionvalue=‘10’/><precisionvalue= 10 /></simpletype></attribute>
<attributename=‘since’ type=‘myDate’/><attributename= since type= myDate /></complextype>
Prof. U. Aßmann, CBSE 13
![Page 14: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/14.jpg)
Question
► Why do people like XML?
► It is wordy► Slow► Ugly►► ....
Prof. U. Aßmann, CBSE 14
![Page 15: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/15.jpg)
The Sumerian Law on Readability
Every language that is not readable by humans will vanishEvery language that is not readable by humans will vanish
Prof. U. Aßmann, CBSE 15
![Page 16: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/16.jpg)
SOAP, An XML-based Interaction Protocol
► Simple Object Access Protocol (SOAP) defines the message ( ) g
► Message contains target address and an envelope
with name space encoding attributes and■ with name space, encoding attributes and■ Header (fixed format) contains
. Authentication (Sender, Receiver), Transactions
HeaderBody
. Transactions,
. Error handling information,
. Routing information …■ Body contains user data (free format)
Envelope
■ Body contains user data (free format)
► Transport is transparent, predefined channels:
HTTP ( ith b k h l d f t■ HTTP (with back channel, de facto standard)
■ SMTP, TCP (with back channel)
Prof. U. Aßmann, CBSE 16
![Page 17: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/17.jpg)
Example: SOAP Header
POST /TreatmentAdmin HTTP/1.1Message Header
HTTP/ /HOST: www.hospital-admin.comContent-Type: text/xmlCharset=“utf-8”Content Length: nnnn
HTTP
Content-Length: nnnnSOAPaction: http://localhost/TreatmentAdmin
<SOAP-ENV:Enveloppxmlns:SOAP-ENV=http://schemas.xmlsoap.org/soap/envelop/SOAP-ENV:Encoding=“http://…/encoding”>
<SOAP-ENV:Header>a A thentication <a:Authentication
xmlns:a=http://localhost/TreatmentAdmin … >…
</a:Authentication>/SOAP ENV H d SOAP Envelop</SOAP-ENV:Header>
<SOAP-ENV:Body> … </SOAP-ENV:Body></SOAP-ENV:Envelop>
SOAP Envelop
Prof. U. Aßmann, CBSE 17
![Page 18: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/18.jpg)
Example: SOAP Body
<SOAP-ENV:Body>
<m:AddTreatment xmlns:a=http://localhost/TreatmentAdmin>
<treatment><patient insurer=“1577500”nr=‘0503760072’/><doctor city =“HD” nr=‘4321’/>
<service>k 1234 / k<mkey>1234-A</mkey>
<date>2001-01-30</date><diagnosis>No complications.</diagnosis></service>
XML Data
</service>
</treatment>
</SOAP-ENV:Body>
Prof. U. Aßmann, CBSE 18
![Page 19: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/19.jpg)
SOAP Interaction Protocol
+ W3C Recommendation (standard)
+ Implements RPC
U t d d t t t d i th- Untyped user data, types to encode in the message
- Interpretation of SOAP messages required
High overhead / low performance
ApproachComponents ofWeb Services
- High overhead / low performance
Approach Web Services
MessagingSOAP
XML Message Description
Prof. U. Aßmann, CBSE 19
NetworkHTTP, FTP, IIOP, MQ, ...
![Page 20: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/20.jpg)
The Interface Concept of Web Services
Prof. U. Aßmann, CBSE 20
![Page 21: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/21.jpg)
Service Interface
OperationXML OperationXML input / output
Web ServiceInterface
Web Services Description Language (WSDL)defines a service interface
Prof. U. Aßmann, CBSE 21
![Page 22: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/22.jpg)
WSDL Components and Their Interfaces
► A WSDL Interface is a set of portsFunctions with types of parameter and results in XML Schema■ Functions with types of parameter and results in XML Schema
■ Event ports■ Plays a similar role as ports of a UML component
► Advantages■ WSDL abstracts from underlying protocol (http, SOAP, mime, IIOP)■ Component model can be mapped to CORBA, EJB, DCOM, .NET■ Component model can be mapped to CORBA, EJB, DCOM, .NET■ WSDL unifies call and event ports■ WSDL abstracts from the underlying component model, introducing the
component model as a secretcomponent model as a secret
<<WebService>>
Prof. U. Aßmann, CBSE 22
![Page 23: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/23.jpg)
WSDL Specification Structure
► Types■ In XML schema or another typing language■ In XML schema or another typing language
► Messages■ The data that is communicated
► Operation ■ An interface of the service, with input and output, fault parameters
► Port type► Port type■ A named set of operations (as in UML)
► Binding■ A mapping of the port to underlying component models, e.g., http, soap, or mime
► ServiceA t f l t d t■ A set of related ports
Prof. U. Aßmann, CBSE 23
![Page 24: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/24.jpg)
WSDL uses Types of XSD
<wsdl:types><XMLSchema:schema … [target name space definitions]>[ g p ]<XMLSchema:element name=“addTreatment”><XMLSchema:complextype><XMLSchema:sequence><s:elementminOccurs="1"maxOccurs="1”name="parameter"<s:elementminOccurs= 1 maxOccurs= 1 name= parameter
nillable="true" type="a:treatment"/></XMLSchema:sequence></XMLSchema:complextype></XMLSchema:element></XMLSchema:element><XMLSchema:element name=“addTreatmentResponse”><XMLSchema:complextype><XMLSchema:sequence>
l i O "1" O "1" “ l "<s:elementminOccurs="1"maxOccurs="1" name=“result"nillable="true" type="XMLSchema:bool"/>
</XMLSchema:sequence></XMLSchema:complextype>p yp</XMLSchema:element><XMLSchema:complextype name=‘treatment’> … </XMLSchema:complextype></XMLSchema:schema>
Prof. U. Aßmann, CBSE 24
/<wsdl:types>
![Page 25: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/25.jpg)
Operations in Port Types
► Event or message based:■ Notification: data-out port■ Notification: data out port■ One-way: data-in port
► Call-based■ Request-Response: procedure port■ Solicit-Response: send, then receive (caller port)
Prof. U. Aßmann, CBSE 25
![Page 26: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/26.jpg)
Example: WSDL Ports, Typed by Message Typesyp
<wsdl:definitions [name space definitions]><wsdl:types> … </wsdl:types>
dl “ dd ”<wsdl:message name=“addTreatmentSOAPIn”><part name=“parameters” element=“addTreatment”/></wsdl:message><wsdl:message name=“addTreatmentSOAPOut”><wsdl:message name addTreatmentSOAPOut ><part name=“parameters” element=“addTreatmentResponse”/></wsdl:message>
<wsdl:porttype name=“TreatmentAdminSOAP“> Actual interface<wsdl:porttype name= TreatmentAdminSOAP ><wsdl:operation name=“addTreatment“><wsdl:input message=“addTreatmentSoapIn“/><wsdl:output message=“addTreatmentSoapOut“/>
Actual interface
</wsdl:operation></wsdl:porttype>
<binding [binding to SOAP / HTTP Protocols] <binding [binding to SOAP / HTTP Protocols] …</wsdl:definitions>
Prof. U. Aßmann, CBSE 26
![Page 27: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/27.jpg)
Example: Binding WSDL to SOAP
<wsdl:binding name=”livetoken” type=”Token”><soap:binding style=”document” p g ytransport=”http://schemas.xmlsoap.org/html”><operation name=”GetLastPrice”><soap:operation
A ti ”htt // t kt d /G tP i ”p p
soapAction=”http://www.stocktrade.com/GetPrice”><input><soap:body use=”literal”></input><output><soap:body use=”literal”></output></operation></operation><wsdl:binding>
Prof. U. Aßmann, CBSE 27
![Page 28: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/28.jpg)
WSDL Service Interface
► WSDL is a Interface Definition Language (IDL)■ Part of BPEL (see later)■ Part of BPEL (see later)■ No inheritance on WSDL■ No standard mapping to data in programming languages
No web service as parameters/results■ No web service as parameters/results
► W3C Recommendation (standard)
Components ofWeb ServicesApproach
Messaging
Service Description
SOAP
WSDL
Network
Messaging
HTTP FTP IIOP MQ
SOAP
XML Message Description
Prof. U. Aßmann, CBSE 28
NetworkHTTP, FTP, IIOP, MQ, ...
![Page 29: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/29.jpg)
Offer and Find Services
► Standardized publishing, advertisement … Extended name server describing interface and properties► Extended name server, describing interface and properties
► XML Descriptor■ White Page: Address■ White Page: Address■ Yellow Page: Semantics (based on standard taxonomy)■ Green Page: Technical specification of service
► Logically central, physically distributed data base
Universal Description Discovery and IntegrationUniversal Description, Discovery and Integration (UDDI) defines service properties
Prof. U. Aßmann, CBSE 29
![Page 30: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/30.jpg)
UDDI
Registered (and other) namesS i D i tiWhite
PageService DescriptionContact person (name, e-mails, …)Telephone/fax numberWeb site YellowWeb site…
YellowPages
Service categoryg yType of industryType av products/servicesGeographic localization…
Green Offered service WSDLGreenPages Documentation, description
Principles cooperation realization…
WSDL
WSDL
Prof. U. Aßmann, CBSE 30
![Page 31: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/31.jpg)
UDDI: Offer and Find Services
-Required and approached - No search strategies - No no trader or market place
Components ofWeb ServicesApproach
Service DiscoveryUDDI
Service Description
Service Publication
WSDL
UDDI
MessagingSOAP
XML Message Description
Prof. U. Aßmann, CBSE 31
NetworkHTTP, FTP, IIOP, MQ, ...
![Page 32: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/32.jpg)
Business Processes (Workflows) on the Web with BPEL
Prof. U. Aßmann, CBSE 32
![Page 33: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/33.jpg)
Business Process
► How to define a business process on the webThere are many languages proposed today:► There are many languages proposed today:■ WSFL, WS-CL, WSCI, XLANG, WSEL, UML, WSUI, WSXL, BPML …
► IBM & Microsoft: BPEL, BPEL4WS,► OASIS: WS BPEL► W3C: OWL-S
B i PBusiness Process
Prof. U. Aßmann, CBSE 33
![Page 34: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/34.jpg)
Ingredients...
► BPEL is an architectural language for web services■ Based on workflow languages■ Based on workflow languages■ Mixing control and data flow operators
► BPEL is a composition language■ Composing web services, using their ports■ Relying on messages (events) and calls
► BPEL builds on WSDL► BPEL builds on WSDL■ For service interface descriptions, as IDL
► BPEL adds connections (partner link types)
Prof. U. Aßmann, CBSE 34
![Page 35: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/35.jpg)
Side Stepping: Which Operational Specifications Exist?p
► Data flow graphs■ Data flows through operations■ Data flows through operations■ Activity diagrams: data flows through actions
► Control-flow graphs■ Nodes are control-flow operations that start other operations on a state
► Mixed approaches■ Cyclic data-flow graphs (also called static-single assignment graphs SSA)■ Cyclic data flow graphs (also called static single assignment graphs, SSA)
. Cycles are marked by phi-nodes that contain control-flow guards■ Statecharts: events trigger state transitions
P t i t t k k t l d d t fl■ Petri nets: tokens mark control and data-flow■ Workflow languages: mix control and data-flow
Prof. U. Aßmann, CBSE 35
![Page 36: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/36.jpg)
Workflow Languages
► A workflow language specifies control and data flow over a set of operationsp■ The operations need not be executed automatically, but can be performed by
humans■ The workflow runs in parallel, because it must model the business process of a■ The workflow runs in parallel, because it must model the business process of a
company■ Workflows are nearer to Colored Petri Nets than to Statecharts
Examples:► Examples:■ ARIS system for SAP■ FlowMark (IBM)■ Lotus Domino (IBM)■ YAWL (van der Aalst, Einhoven): based on Colored Petri Nets
Prof. U. Aßmann, CBSE 36
![Page 37: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/37.jpg)
Typical Operations in Workflow Languages
► AND-split: all ► XOR-split: 1 of n► XOR-split: 1 of n► OR-split: m of n
AND j i ll f► AND-join: all of n► XOR-join: 1 of n
OR join: m of n► OR-join: m of n
Prof. U. Aßmann, CBSE 37
![Page 38: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/38.jpg)
What are Workflow Engines?
► Workflow engines are interpreters of workflows■ They maintain the parallelism in a workflow and synchronize all processes■ They maintain the parallelism in a workflow and synchronize all processes
► Usually, they also support for interactive applications■ Undo■ Transactions with rollback and commit■ Compensation (in case of error)
► They are, for web services and component systems, composition► They are, for web services and component systems, composition engines that execute a composition program
Prof. U. Aßmann, CBSE 38
![Page 39: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/39.jpg)
BPEL Made Simple
► BPEL is a activity-diagram like language, ■ with parallelism and transactions■ with parallelism and transactions■ with different kind of join and split operators■ with ports and connections
BPEL can be edited graphically and has an XML abstract syntax■ BPEL can be edited graphically, and has an XML abstract syntax
► To create a web service, becomes a similar activity as editing an UML activity diagram or Petri Net
Prof. U. Aßmann, CBSE 39
![Page 40: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/40.jpg)
BPEL Specification Structure
► Process definition: Header with namespace declarations► Variables: global variables of the process► Variables: global variables of the process► PartnerLink declarations: interface declaration
■ with whom is the process connected?
► Partners: actual partners of the communication► Correlation sets: Which instance of a process is talking to which
th i t ?other instance?► Fault handler: What happens in the case of an exception?► Compensation handler: compensation actions► Compensation handler: compensation actions ► Event handler: what happens in case of a certain event?► A (structured) main operation► A (structured) main operation
■ e.g., sequence or flow
Prof. U. Aßmann, CBSE 40
![Page 41: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/41.jpg)
WSDL Definitions as a Basis
► BPEL uses WSDL definitions to define types, message types, and port typesp yp■ WSDL definitions can be without binding
. Bindings can be added when the BPEL process is deployedThat increases reuse of the process. That increases reuse of the process
■ This achieves component model transparency (independence of the underlying component model)
BPEL dd t li k t ( t t )► BPEL adds partner link types (connector types)■ which are typed connections
Prof. U. Aßmann, CBSE 41
![Page 42: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/42.jpg)
A Simple Pizza Order
<!-- Process definition --><process name=”OrderPizza” suppressJoinFailure=”yes” xmlns=”http://schema.xmlsoap.org/ws/2003/03/business-process”
pns=”http://www.pizza.org/schema”>
<partnerLinks><partnerLink name=”PizzaService” partnerLinkType=”pns:OrderChannel”
myRole=”PizzaOrderer”>
</partnerLinks>
<! Gl b l V i bl >Connector
<!-- Global Variables -->
<variables><variable name=”input” messageType=”PizzaOrder”/>
i bl ” t t” T ”Pi D li ”/<variable name=”output” messageType=”PizzaDelivery”/>
</variables>
<faultHandlers> ... </faultHandlers>
<sequence name=”body”><invoke name=”order” partnerLink=”PizzaService” portType=”PizzaOrder“
operation=”body” variable=”output”><receive name=”acknowledgement” partnerLink=”PizzaService” portType=”Pizza“
Prof. U. Aßmann, CBSE 42
<receive name= acknowledgement partnerLink= PizzaService portType= Pizzaoperation=”body” variable=”input”>
</sequence>
</process>
![Page 43: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/43.jpg)
Flow Operations are Workflow Graphs
► The <flow> operation is structured as a workflow graphs■ The names of messages, ports, partner links help to span up the graph■ The names of messages, ports, partner links help to span up the graph■ <flow> executes its sequences in parallel■ <links> can synchronize parallel tasks
<fl ><flow>
<links><link> name=”A”</link>
<link>name=”B”</link>
</links>
<sequence>..<invoke><target name=”A”>..</sequence>
<sequence>....<target name =”B”>...........</sequence>
</flow>
A
B
Prof. U. Aßmann, CBSE 43
![Page 44: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/44.jpg)
Other Operations in BPEL
► Structured control-flow■ sequence■ sequence■ switch■ while
flow■ flow■ pick (XOR join)■ terminate
► compensate► scope► assign
Prof. U. Aßmann, CBSE 44
![Page 45: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/45.jpg)
BPEL Tools
► Collaxa designer www.collaxa.com► People work on the translation of Colored Petri Nets and UML activity► People work on the translation of Colored Petri Nets and UML activity
diagrams from and to BPEL■ CPN have good formal features (see ST-2) ■ Can be used for deadlock checking, resource control, etc.■ YAWL is such a nice language, see the work of [van der Aalst]
Prof. U. Aßmann, CBSE 45
![Page 46: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/46.jpg)
OWL-S (Web Ontology LanguageOWL-S (Web Ontology Languagefor Services)
CBSE, © Prof. Uwe Aßmann 46
![Page 47: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/47.jpg)
OWL Web Ontology Language
► Classes and relationships► Expressions to compute (derive) new classes and relationships► Expressions to compute (derive) new classes and relationships
(derived model)■ Union, intersection of relations and classes■ Cardinality restrictions■ Existential quantifiers
► Roughly speaking, OWL corresponds to UML-class diagrams without► Roughly speaking, OWL corresponds to UML class diagrams without methods + OCL + class expressions
► Instead of plain XML, OWL can be used to type data■ Beyond trees and context-free structures, graphs, knowledge webs, semantic nets
can be described (context-sensitive structures)
Prof. U. Aßmann, CBSE 47
![Page 48: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/48.jpg)
OWL-S
► Based on OWL, a language for specification of web services has been developed by the OWL-S coalitionp y
► Specification has three parts:■ Service profile: semantic service description, service offer, service functionality
(what does the service provide?)(what does the service provide?). Based on domain ontologies in OWL, i.e., OWL-specified attributes
■ Service model: service realization, decomposition of a service (how does the i k?)service work?)
. Service is also called a process
. Here, OWL-S provides a process ontology■ Service grounding: service mapping to underlying mechanisms (how is the service
mapped to a component model and transport protocol?) Similar to WSDL grounding
Prof. U. Aßmann, CBSE 48
![Page 49: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/49.jpg)
OWL-S Processes
► Atomic■ Cannot be decomposed■ Cannot be decomposed■ Can be called and executed■ Can be mapped to WSDL process descriptions (grounding), and hence, to SOAP
Si l► Simple■ Cannot be decomposed■ Can be executed, but not be called from outside
► Composite■ Build from atomic and simple processes
Prof. U. Aßmann, CBSE 49
![Page 50: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/50.jpg)
Service Model (Process Model) of OWL-S
► Process Ontology ■ Describes a service (process) with an IOPE specification■ Describes a service (process) with an IOPE specification
. Inputs
. Outputs Parameters. Parameters
. Effects
► Process control ontology (for composite processes)■ Internal realization with state, activation, execution, completion (control-flow
specification)
Prof. U. Aßmann, CBSE 50
![Page 51: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/51.jpg)
Creating an OWL-S specification
► Describe atomic processes► Describe grounding of atomic processes► Describe grounding of atomic processes► Describe compositions► Describe simple processesp p► Describe profile of service
Prof. U. Aßmann, CBSE 51
![Page 52: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/52.jpg)
Buying a Book from Amazon
► [Alesso/Smith]
Locate book
Put In ShoppingBasketpp g
Begin CheckoutOne-Click
Create AccountCreate Account
C t U P filLoad User Profile
One-ClickBuy
Create User ProfileLoad User Profile
Commit Checkout
Payment Selection
Fill i D li D t il
Prof. U. Aßmann, CBSE 52
Fill in Delivery Details
Commit Purchase
![Page 53: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/53.jpg)
OWL-S Statements of a Composite Process
► Unordered (unspecified order)► Sequence► Sequence► Split► Split+Join (fork and join)p ( j )► Concurrent► Choice► If-then-else► Repeat-until ► Repeat-while
Prof. U. Aßmann, CBSE 53
![Page 54: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/54.jpg)
Business Process
Components ofComponents ofWeb ServicesApproach
S i DiUDDI
WorkflowOWL-SBPEL BPML
S i D i ti
Service Publication
Service Discovery
WSDL
UDDI
UDDI
Messaging
Service Description
SOAP
WSDL
NetworkHTTP, FTP, IIOP, MQ, ...
XML Message Description
Prof. U. Aßmann, CBSE 54
![Page 55: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/55.jpg)
Trust and Security
CBSE, © Prof. Uwe Aßmann 55
![Page 56: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/56.jpg)
Trust and Security
► Policies: when do I allow somebody to do somethingIntegrity: intact unchanged► Integrity: intact, unchanged
► Confidentiality: cryptification policy► Authentication: proof of identity► Authentication: proof of identity ► Authorization: access to execute certain services► Non-Repudiation: waranty on failior► Non Repudiation: waranty on failior ► Legal Rights: copy rights, reselling rights, ...► Privacy: handling personal data y g p► ...
Prof. U. Aßmann, CBSE 56
![Page 57: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/57.jpg)
Trust and Security
Components ofComponents ofWeb ServicesApproach
S i DiUDDI
WorkflowOWL-SBPEL BPML
WS-Security
Sec
S i D i ti
Service Publication
Service Discovery
WSDL
UDDI
UDDI
curity
Messaging
Service Description
SOAP
WSDL
NetworkHTTP, FTP, IIOP, MQ, ...
XML Message Description
Prof. U. Aßmann, CBSE 57
![Page 58: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/58.jpg)
Technical Conclusion
Defined with XMLDefined with XML
Web Services minimum
UDDI
OWL-SBPEL BPML
WS-Security
WSDL
UDDI
UDDI
SOAP
WSDL
HTTP, FTP, IIOP, MQ, ...
XML
Prof. U. Aßmann, CBSE 58
![Page 59: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/59.jpg)
Problems of Classical Component Systems
► Different basic communication of the systems, Corba components cannot talk directly with COM components etc■ Corba components cannot talk directly with COM components etc.
■ Adaptation on technical level necessary
► Not full remote transparency► Dependence on the component model
Prof. U. Aßmann, CBSE 59
![Page 60: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/60.jpg)
Web Services – Component Model Transparencyp y
► Language adaptation: XML Schema + WSDL► Remote transparency: SOAP (+ HTTP)► Remote transparency: SOAP (+ HTTP)► Component model transparency (EJB, COM+, CORBA, CCM, Beans,
etc...)
ServerLocalClient
RemoteClient Server
C++C
COM+CCM
Java
EJB
WSDLWSDLWSDL
SOAP (HTTP) RemoteSOAP (HTTP) Local
Prof. U. Aßmann, CBSE 60
( )
![Page 61: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/61.jpg)
Evaluation of Web Services
as composition systemp y
CBSE, © Prof. Uwe Aßmann 61
![Page 62: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/62.jpg)
Component Model
► Mechanisms for secrets and transparency: very good■ Location, language, component model transparency■ Location, language, component model transparency■ Communication protocol transparency
► Generic BPEL Web Services (without bound WSDL ports)
Prof. U. Aßmann, CBSE 62
![Page 63: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/63.jpg)
Composition Technique
► Mechanisms for connection■ Protocol transparency allows for flexible connections■ Protocol transparency allows for flexible connections■ WSDL binding is flexible
► Mechanisms for aspect separation► Mechanisms for Meta-modeling
■ Used
► Scalability: Better► Scalability: Better■ Changes of protocol possible■ Changes of distribution easy■ Changes of workflow easy
Prof. U. Aßmann, CBSE 63
![Page 64: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/64.jpg)
Composition Language
► BPEL and OWL-S workflows are nice composition languages■ Not yet full exchangeability of connector types■ Not yet full exchangeability of connector types■ But graphic support for workflow specifications
► Metacomposition fully supported■ The generation of a BPEL or OWL-S script is easy, because it is XML based■ Environments as Collaxa will generate workflow from other specifications■ Generic workflow architectures will be possible
Prof. U. Aßmann, CBSE 64
![Page 65: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/65.jpg)
Web Services - Component Model
Secrets
Developmentenvironments
Typesenvironments
Distribution
ContractsBusiness services
Bi di i t
services
Binding points
Infrastructure
Prof. U. Aßmann, CBSE 65
ParameterizationInfrastructure
Versioning
![Page 66: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/66.jpg)
Web Services – Composition Technique and Languageg g
Adaptationp
ConnectionProduct quality
Extensibility Software process
MetacompositionAspect Separation
Prof. U. Aßmann, CBSE 66
Scalability
![Page 67: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/67.jpg)
Web Services as Composition Systems
Component Model Composition Technique
Contents: Completely hidden
Binding points: WSDL ports
Adaptation: well supported
Automatic transactions, recovery
Several types of connectors
f
C iti L
BPEL is a workflow language
Prof. U. Aßmann, CBSE 67
Composition Language
![Page 68: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/68.jpg)
So Far: Blackbox Composition
► Standard middleware■ CORBA, DCOM■ CORBA, DCOM
► Implicit middleware■ EJB
► Architecture systems■ Web services
Prof. U. Aßmann, CBSE 68
![Page 69: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/69.jpg)
The Ladder of Component and Composition Systems
S ft
y
Aspect Systems View Systems
Aspect Separation Composition Composition
SoftwareComposition Systems
Aspect/J Invasive CompositionMetaclass Composition
Aspect Separation pOperators
CompositionLanguage
Composition FiltersHyperslices
Architecture Systems Darwin BPELACME
Metaclass CompositionPiccola
Architecture as Aspect
Hyperslices
Classical Component Systems
y ACME
Standard Components
p
.NET CORBABeans EJBComponent Systems
Object-Oriented Systems C++ JavaObjects asRun-Time Components
Beans EJB
Prof. U. Aßmann, CBSE 69
p
Modular Systems Modula Ada-85Modules as Compile-Time Components
![Page 70: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/70.jpg)
The Second Part of the Course: Greybox Compositionp
► Generic programming■ Generic program elements
► Invasive software composition■ Generic program elements
■ Home-made connectors
► View-based programming
composition■ Slots and hooks
► Novel Forms of■ Formal foundations (lambda N,
pi-calculus)■ Record calculi Scala
► Novel Forms of Composition ■ Uniform composition■ Record calculi, Scala
■ Hyperspace programming
► Aspect-oriented development
p■ Active document
composition: Architectural styles for active documents
■ Aspect-oriented programming■ Aspect-oriented design
Dynamic aspect oriented
styles for active documents and web systems
■ Roundtrip engineering and ■ Dynamic aspect-oriented
programming (EAOP)
p g gcomposition
Prof. U. Aßmann, CBSE 70
![Page 71: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/71.jpg)
Some Abbreviations
► ebXML: Electronic Business XML► UDDI: Universal Description, Discovery and Integration ► OAG: Open Applications Group► OASIS: Organization for the Advancement of Structured
Information Standards► SOAP: Simple Object Access Protocol► SOAP: Simple Object Access Protocol► HTTP: Hypertext Transfer Protocol► tpaML: Trading Partner Agreement Markup Language► UML: Unified Modeling Language► UN/CEFACT: United Nations Centre for the Facilitation of Procedures and
Practices in Administration, Commerce and Transport
► WSFL: Web Services Flow Languageg g► WSDL: Web Services Description Language ► WSIL: Web Services Inspection Language► WSXL: Web Services Experience Language
WSCL W b S i C ti L► WSCL: Web Services Conversation Language► WSUI: Web Services User Interface► WSML: Web Services Meta Language► WSCM: (Web Services Component Model) Numer omdöpt till WSIA
Prof. U. Aßmann, CBSE 71
► WSCM: (Web Services Component Model) Numer omdöpt till WSIA► WSIA: Web Services for Interactive Applications► WSEL: Web Services Endpoint Language► WSRP: Web Services for Remote Portals
![Page 72: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/72.jpg)
Some URLs
► www.ebxml.orgwww uddi org► www.uddi.org
► www.oasis-open.org► www.uncefact.org► www.uncefact.org► www.w3.org► www.omg.org► www.biztalk.org► www.soapclient.com► www soapware org► www.soapware.org► www.xml.com► www.xml.orgg► www.webservices.org► www.webservicesarchitect.com
i
Prof. U. Aßmann, CBSE 72
► www.ws-i.org
![Page 73: Web Services andWeb Services and Service-Oriented Architectures](https://reader035.fdocuments.in/reader035/viewer/2022081622/613d191e736caf36b7594a41/html5/thumbnails/73.jpg)
The End
► Many slides inherited from► Stig Berild's talk on the Nordic Conference on Web Services Nov► Stig Berild s talk on the Nordic Conference on Web Services, Nov.
2002 ► Prof. Welf Löwe, Web Service Competence Center (WSCC), Växjö
University:■ [email protected]
htt // i / i■ http://www.msi.vxu.se/~rics
Prof. U. Aßmann, CBSE 73