25
Web Service Composition Prepared by Robert Ma February 5, 2007

Web Service Composition Prepared by Robert Ma February 5, 2007

Embed Size (px)

Citation preview

Page 1: Web Service Composition Prepared by Robert Ma February 5, 2007

Web Service Composition

Prepared by

Robert Ma

February 5, 2007

Page 2: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

Web Services

Consider the following set of web services

orderFromSupplier wsdl

orderReceived wsdl

replyCustomer wsdl

checkInventory wsdl

shipOrder wsdl

UDDI

XY Z CORP

wsdl

wsdl

wsdl

wsdl

wsdl

Page 3: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

Web Services (2)

What about between organizations?

orderFromSupplier wsdl

orderReceived wsdl

replyCustomer wsdl

checkInventory wsdl

shipOrder wsdl

UDDI

XY Z CORP

wsdl

wsdl

wsdl

wsdl

wsdl Supplier 1

Supplier 2

Supplier 3

Page 4: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

Overview

Businesses today requires to quickly adapt to customer needs and market conditions EAI and B2B interactions (through web services)

Needs to be flexible internally and externally

Without a common set of standard, each organization is left to build their own set of proprietary business protocols Leaving little flexibility for true web services collaboration

Page 5: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

Web Service Composition

Definition:

Provides an open, standards-based approach for connecting web services together to create higher-level business processes.

Standards are designed to reduce the complexity required to compose web services, hence reducing time and costs, and increase overall efficiency in businesses

Page 6: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

Web Service Composition (2)

orderFromSupplier wsdl

orderReceived wsdl

replyCustomer wsdl

checkInventory wsdl

shipOrder wsdl

UDDI

XY Z CORP

wsdl

wsdl

wsdl

wsdl

wsdl Supplier 1

Supplier 2

Supplier 3

XY Z CORP

Supplier 1 Supplier 2 Supplier 3

replyCustomer wsdlwsdlorderReceived wsdlwsdl

orderFromSupplier wsdlwsdl

checkInventory wsdlwsdl shipOrder wsdlwsdl

wsdl

wsdl wsdl wsdl

Page 7: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

Basic Requirements Ability to invoke services in a asynchronous manner

Achieve reliability, scalability, and adaptability required by Today’s IT environment

Manage exception and transactional integrity Studies shown nearly 80% of the time spent in building business

processes are spent in exception management

Provide dynamic, flexible, and adaptable framework Provide a clear separation between the process logic and the

web services used Able to compose higher-level services from existing processes

Page 8: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

Standards

BPEL4WS (a.k.a. BPEL) – Business Process Execution Language for Web Services IBM and Microsoft

WSCI – Web Services Choreography Interface Sun, SAP, BEA, and Intalio

BPML – Business Process Management Language BPMI.org (chartered by Intarlio, Sterling Commerce, Sun,

CSC, and others)

Page 9: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

BPEL4WS

XML-Based language

It describes the control logic for web services coordination in a business process

Interpreted and executed by a BPEL engine

Page 10: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

BPEL - Overview

Use Web Services Standard as a base1. Every BPEL is exposed as a web service using

WSDL. And the WSDL describes the public entry and exit points of the process

2. Interacts through WSDL interfaces with external web services

3. WSDL data types are used to describe information flow within the BPEL process

Page 11: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

BPEL - Process Overview

Page 12: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

BPEL - Process Models

Provides support for two business process models Executable

Models the behavior of participants in a specific business interaction, a private workflow

Abstract Business protocols in BPEL, specify the public

message exchanges between parties

Page 13: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

BPEL - Activities

Basic Activities: Interacts with external services

<invoke>, <receive>, and <reply>

Structured Activities: Internal process control flow

sequential flow, conditional branching, looping, and etc.

Page 14: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

BPEL - Containers and Partners

Containers Data exchanges in the message flow

e.g. WSDL messageType

Partners Any services that the process invokes OR any services that

the invokes the process

<partners><partner name=”buyer” … myRole=”agent”/><partner name=”supplier” … myRole=”requestor” partnerRole=”supplier”/>

</partners><containers>

<container name=”request” messageType=”tns:orderRequest”/><container name=”response” messageType=”tns:orderResponse”/>

</containers>

Page 15: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

BPEL - Code

A sequence<sequence>

<receive partner=”buyer” … operation=”sendOrder” container=”request”/>

<invoke partner=”supplier” … operation=”request” container=”order”/>

<reply partner=”buyer” … operation=”response” container=”proposal”/>

</sequence>

sendOrder

request

response

request

proposal

order

Page 16: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

BPEL - Others

Transactions and Exceptions Building on top of WS-Coordination and WS-Transaction

specifications

Transaction A set of activities can be grouped in a single transaction

through the <scope> tag Can specify compensation handlers (rollback) if there is an error

Exception Handling Through the use of throw and catch (similar to Java)

Page 17: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

BPEL – Example Process

Page 18: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

WSCI

XML-based language Defines the choreography describing the

messages between web services that participate in a collaborative exchange

Only describes the observable behavior between web services No single controlling process managing the interaction

Page 19: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

WSCI - Actions

Actions <action> represents a unit of work and would typically map to a specific WSDL operation

WSDL describes the entry points of each service WSCI describes the interactions among these

operations

External services are invoked through <call> tag

Supports transaction and exception handling

Page 20: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

WSCI - Snippet<process name=”Purchase” instantiation=”message”>

<sequence><action name=”ReceiveOrder” role=”Agent” operation=”tns:Order”></action>

<action name=”Confirm” role=”Agent” operation=”tns:Confirm”><correlate correlation=”tns:ordered”/><call process=”tns:Purchase”/>

</action></sequence>

</process>

Note: this WSCI is from the perspective of the “Agent”, there would also be WSCI file for other parties in the process

Page 21: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

BPML

XML-based language Incorporates WSCI into the standard

WSCI used to describe public interactions BPML used to develop private logic

implementations Provides similar process flow constructs and

activities as BPEL Transactional support and exception

handling

Page 22: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

Summary

BPEL and BPML focuses on creation of business processes Describe an executable process from the

partner’s perspective WSCI focuses on public message exchanges

between web services Each participant in message exchange defines a

WSCI interface

Page 23: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

Summary

Page 24: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

Some Open/Closed Source Engines

BPEL IBM

WebSphere Process Server + WebSphere Integration Developer $5014 for a 12-month license

Microsoft BizTalk Server

Standard Ed. for $8499 USD and Enterprise Ed. for $29999 USD http://www.microsoft.com/biztalk/howtobuy/default.mspx

Open Source Twister

$0 Eclipse - SOA Tools Platform

$0

Page 25: Web Service Composition Prepared by Robert Ma February 5, 2007

ECE 1770 –Web Service Composition

Discussion

Security in Web Service Composition and Web Service in general A number of standards like XML Digital Signatures and

Encryption, WS-Security Provide authentication and authorization of users, and for

securing the XML message itself But composition standards do not offer direct support for

security! In BPEL, how do the roles defined for each partner relate

the existing authentication standards?