Web Services - PowerPoint PPT Presentation

1 / 115
About This Presentation
Title:

Web Services

Description:

... operations accessible over a network using Web Services technologies. ... schema targetNamespace='http://example.com/stockquote.xsd' xmlns='http://www.w3. ... – PowerPoint PPT presentation

Number of Views:95
Avg rating:3.0/5.0
Slides: 116
Provided by: users
Category:
Tags: cartoon | com | network | services | web

less

Transcript and Presenter's Notes

Title: Web Services


1
Web Services
  • Vagelis Hristidis
  • FIU

2
What is the Transactional Web
  • Today The eye-ball Web - the architecture of
    the Web is geared towards delivering information
    visually.
  • Tomorrow The transactional Web the
    architecture of the Web geared towards
    intelligently exchanging information between
    applications.

3
What is the Transactional Web
  • Web Services (plural) is a blanket term
    representing all of the technologies that enable
    the transactional web to exist.
  • Web Service (singular) is a term referring to a
    collection of application operations accessible
    over a network using Web Services technologies.

4
Why do we need Web Services?
  • Standard way to export functionality
  • To implement the Semantic Web
  • Allow agents
  • Allow communication between applications
  • Allow searching for available applications
  • Examples stock quotes, retail, b2b, libraries,

5
WSAH(Web Services Acronym Hell)
DIME
ebXML
XSD
XML
WSDL
XML-ENC
JABBER
SOAP-SEC
SOAP
XML-RPC
SAML
DISCO
SOAP-RP
XMLP
XLANG
CPP-CPA
DSML
UDDI
WSFL
WSEL
P3P
DAML-S
X-KISS
BPEL
PKI
XKMS
XML-DIGSIG
DISCO
6
Roadmap
  • Web Services Stack
  • SOAP
  • WSDL
  • UDDI
  • Web Services Composition - BPEL
  • Issues

7
The Web Services Stack
Wire Protocols
Description
Discovery
SOAP Blocks
Agreements
SOAP/XMLP
Process
XML
WSDL Extensions
HTTP/SMTP/BEEP
WSDL
Registry (UDDI)
TCP/IP
XML
Inspection
The Web Services Stack helps us understand how
each of the various pieces fit into the Big
Picture
8
The Web Services Stack
  • Wire Protocols
  • Primary Role provide a standard, flexible
    communications channel
  • Secondary Role provide a standard, flexible
    wire-level data representation
  • Advantage interoperability at the lowest level

9
The Web Services Stack
  • Description
  • Primary Role provide a standard, flexible way to
    describe what and how a Web service does what it
    does.
  • Advantage interoperability

10
The Web Services Stack
  • Discovery
  • Primary Role provide a standard, flexible way to
    discover where a Web service is located and where
    to find more information about what the Web
    service does (the description)
  • Advantage interoperability, dynamic integration

11
Web Services Stack
BusinessProcesses
Transactions
Quality ofService
Coordination
WS-Security
WS-Reliability
Context
Management
UDDI
Discovery
Description
WSDL
Description
SOAP
Message
XML
HTTP,IIOP, JMS, SMTP
Transport
12
Roadmap
  • Web Services Stack
  • SOAP
  • WSDL
  • UDDI
  • Web Services Composition - BPEL
  • Issues

13
SOAP
  • SOAP stands for Simple Object Access Protocol
  • Made up of three major parts
  • A messaging framework
  • An encoding standard
  • An RPC (remote procedure call) framework
  • It is possible to use just the messaging
    framework or messaging framework/encoding
    standard without using the RPC mechanism (though
    latter is where much of power lies).
  • SOAP is based entirely on XML

14
SOAP Messaging framework
  • Just defines a generic document type using XML
  • This document type represents the abstraction of
    a message
  • Virtually any type of message you can think of
    can be packaged as a SOAP message.
  • However, doing so without RPC mechanisms takes
    only very small advantage of the features defined
    in the SOAP standard

15
General (Basic) Structure SOAP Message
  • Envelope
  • Defines the content of the message
  • Header (optional)
  • Contains destination information, versioning,
    extensions
  • Good place for security
  • Body
  • Contains payload

SOAP Envelope
SOAP Header
SOAP Body
Payload Document(s)
SOAP Fault
16
General (Basic) Structure SOAP Message
  • ltsoapEnvelope
  • xmlnssoap"http//schemas.xmlsoap.org/soap/encodi
    ng/"
  • soapencodingStyle"http//schemas.xmlsoap.org/soa
    p/encoding/"
  • gt
  • ltsoapHeadergt
  • ... ...
  • lt/soapHeadergt
  • ltsoapBodygt
  • lt!-- User request code here --gt
  • ltsoapFaultgt
  • ... ...
  • lt/soapFaultgt
  • lt/soapBodygt
  • lt/soapEnvelopegt

17
SOAP encoding
  • The second component of SOAP is a standard for
    how to represent common datatypes as SOAP types.
    This is knows as the encoding style.
  • SOAP does this in a language agnostic way, much
    like CORBA (but not in binary form)
  • For example, SOAP stipulates that an array of
    three integers be represented as
  • SOAP-ENCArray SOAP-ENCarrayType"xsdint3"gtltS
    OAP-ENCintgt8lt/SOAP-ENCintgtltSOAP-ENCintgt5lt/SOAP
    -ENCintgtltSOAP-ENCintgt9lt/SOAP-ENCintgtlt/SOAP-EN
    CArraygt

18
SOAP RPC
  • The third part of SOAP is an RPC mechanism that
    turns messages into method calls
  • We have a generic message structure data. It
    requires just a little more work to turn the
    message into a function call.
  • Must be a way to represent parameters and return
    values, exceptions, etc.

19
SOAP RPC cartoon
VB application
Java application
InvoiceVB-Structure
InvoiceJava-Structure
SOAP client
SOAP Server
SOAP Message
The client application thinks its making a
procedure call to a remote module
20
SOAP protocol bindings
  • Questionhow are SOAP messages transmitted?
  • Answer using existing protocols (http, SMTP,
    etc.)
  • This has some obvious advantages vs. defining its
    own protocol
  • Piggybacks on security model, general robustness
  • SOAP defines bindings to different protocols that
    specify how SOAP is used with that protocol to
    send messages.
  • http is most popular

21
Roadmap
  • Web Services Stack
  • SOAP
  • WSDL
  • UDDI
  • Web Services Composition - BPEL
  • Issues

22
Source
  • WSDL 1.1 specification
  • http//www.w3.org/TR/wsdl
  • WSDL 1.2 working draft
  • http//www.w3.org/TR/wsdl12/
  • W3C School Tutorial
  • http//www.w3schools.com/wsdl/wsdl_intro.asp

23
What is WSDL
  • Web Service Description Language.
  • An XML language used to describe and locate web
    services.
  • Written in XML.
  • Describe functionality of a web service
  • Specify how to access the service (binding
    protocol, message format, and etc.)
  • Not a W3C standard yet.
  • Version 1.1 released March 2001
  • Working draft of Version 1.2 released July 2003

24
Related Standards
  • Type System XML Schema
  • Name space XML namespaces
  • Binding SOAP, HTTP, MIME and etc.

25
The Main Structure of WSDL
  • ltdefinition namespace http/ gt
  • lttypegt xschema types lt/typegt
  • ltmessagegt lt/messagegt
  • ltportgt a set of operations lt/portgt
  • ltbindinggt communication protocols lt/bindinggt
  • ltservicegt a list of binding and ports lt/servicegt
  • ltdefinitiongt

26
WSDL - Overview
ltdefinitionsgt lttypesgt lt!-- XML Schema --gt
lt/typesgt ltmessage namegetQuote_In /gt
ltmessage namegetQuote_Out /gt ltportType
nameStockQuoteServiceInterfacegt
ltoperation namegetQuotegt ltinput
messagegetQuote_In /gt ltoutput
messagegetQuote_Out /gt lt/operationgt
lt/portTypegt ltbinding nameStockQuoteServiceB
inding typeStockQuoteServiceInterfacegt
ltsoapbinding transporthttp//schemas.xmlsoap.o
rg/soap/http /gt lt/bindinggt
ltservice nameStockQuoteServicegt ltport
nameStockQuoteServicePort bindingStockQuoteSe
rviceBindinggt ltsoapaddress
locationhttp//www.acme.com/services/stockquote
/gt lt/portgt lt/servicegt lt/definitionsgt
Definition of data types
Definition of messages
Definition of port type
Definition of the bindings
Definition of the service
27
Types
  • lttypesgt define types used in message declaration
  • XML Schema, DTD, and etc.
  • XML Schema must be supported by any vendor of
    WSDL conformant products.

28
  • lttypesgt
  • ltschema targetNamespace"http//example.com/sto
    ckquote.xsd" xmlns"http//www.w3.org/2000/10/XMLS
    chema"gt
  • ltelement name"TradePriceRequest"gt
  • ltcomplexTypegt
  • ltallgt
  • ltelement
    name"tickerSymbol" type"string
  • minOccur 1
    maxOccur10/gt
  • ltelement name paymentgt
  • ltcomplexTypegt
    ltchoicegt
  • ltelement name
    account typestringgt
  • ltelement name
    creditcard typestringgt
  • lt/choicegt
    lt/complexTypegt
  • lt/elementgt
  • lt/allgt
  • lt/complexTypegt
  • lt/elementgt
  • lt/schemagt
  • lt/typesgt

29
WSDL Messages
  • The ltmessagegt element defines the data elements
    of an operation.
  • Each messages can consist of one or more parts.
    The parts can be compared to the parameters of a
    function call in a traditional programming
    language.

30
ltmessage name"GetLastTradePriceInput"gt ltpart
name"body" element"TradePriceRequest"/gt
lt/messagegt ltmessage name"GetLastTradePriceOutp
ut"gt ltpart name"body" element"TradePrice"/gt
lt/messagegt
31
WSDL Ports
  • The ltportTypegt element is the most important WSDL
    element.
  • It defines a web service, the operations that can
    be performed, and the messages that are involved.
  • The ltportgt defines the connection point to a web
    service, an instance of ltportTypegt.
  • It can be compared to a function library (or a
    module, or a class) in a traditional programming
    language. Each operation can be compared to a
    function in a traditional programming language.

32
ltportType name"StockQuotePortType"gt
ltoperation name"GetLastTradePrice"gt
ltinput message"tnsGetLastTradePriceInput"/gt
ltoutput message"tnsGetLastTradePriceOutput"
/gt lt/operationgt lt/portTypegt
33
Operation Types
  • The request-response type is the most common
    operation type, but WSDL defines four types
  • One-way The operation can receive a message but
    will not return a response
  • Request-responseThe operation can receive a
    request and will return a response
  • Solicit-responseThe operation can send a request
    and will wait for a response
  • NotificationThe operation can send a message but
    will not wait for a response
  • -- v 1.2 addition
  • request multiple response

34
One way and Notification Example
ltportType nameRegisterPort"gt ltoperation
nameregister"gt ltinput namecustomerInfo"
messageRegInfo"/gt lt/operationgt
ltoperation name register Responsegt
ltoutput name response messageResponseInfo/gt
lt/operationgt lt/portType gt
35
Binding
  • Binding defines how message are transmitted, and
    the location of the service.

36
ltbinding name"StockQuoteSoapBinding"
type"tnsStockQuotePortType"gt
ltsoapbinding style"document"
transport"http//schemas.xmlsoap.org/soap/http"/gt
ltoperation name"GetLastTradePrice"gt
ltsoapoperation soapAction"http//example.co
m/GetLastTradePrice"/gt ltinputgt
ltsoapbody use"literal"/gt
lt/inputgt ltoutputgt
ltsoapbody use"literal"/gt lt/outputgt
lt/operationgt lt/bindinggt
37
ltservice name"StockQuoteService"gt
ltdocumentationgtMy first servicelt/documentationgt
ltport name"StockQuotePort" binding"tnsStockQuo
teBinding"gt ltsoapaddress
location"http//example.com/stockquote"/gt
lt/portgt lt/servicegt
38
Roadmap
  • Web Services Stack
  • SOAP
  • WSDL
  • UDDI
  • Web Services Composition - BPEL
  • Issues

39
WSDL and UDDI
  • Description of web service.
  • Discovery of web service?
  • UDDI yellow page.

40
What is UDDI
  • UDDI is a platform-independent framework for
    describing services, discovering businesses, and
    integrating business services by using the
    Internet.
  • UDDI stands for Universal Description, Discovery
    and Integration
  • UDDI is a directory for storing information about
    web services
  • UDDI is a directory of web service interfaces
    described by WSDL or another description language

41
UDDI Overview
  • UDDI is
  • A Web Services API for publishing and discovering
    the existence of Web services
  • A registry for managing information about Web
    services
  • A coalition of organizations working together to
    manage UDDI registries and to further develop the
    Web Services API for accessing those registries.

42
UDDI Overview
  • UDDI is built around a Yellow-pages like data
    model

Business Entity
Identities
Business Services
Categories
Service Bindings
TModels
43
UDDI Overview
  • TModel Technology Model

TModel
TModel Instance
Abstract metadata definition relating to some
aspect of the UDDI registration
Implementation specific metadata conforming to a
given TModel.
TModel Abstract Class
44
UDDI Overview
  • TModels
  • Categories Identifiers
  • Categorization and Identification taxonomies are
    TModels
  • Categories and Identifiers are TModel Instances
  • Keyed Referenced
  • Name Value TModel
  • Examples NAICS, UNSPSC, DB
  • WSDL Port Types
  • WSDL Port Types are TModels
  • WSDL Services that are bound to a Port Type are
    TModel Instances
  • WSFL Business Processes
  • WSFL Flow Models are TModels
  • WSFL Global Models are TModel instances

TModels represent the extent of UDDIs semantic
description capabilities.
45
UDDI Overview
  • UDDI has only limited extensibility through
    TModels
  • UDDI was created by IBM, Microsoft and Ariba
    (many companies have joined the effort)
  • The intent was to put something together that
    worked.

46
UDDI Overview
  • UDDI Version 1.0 September 2000 (in production)
  • UDDI Version 2.0 June 2001
  • UDDI Version 3.0 - In development
  • UDDI will be presented to a standards body after
    Version 3.0

47
How can UDDI be Used
  • If the industry published an UDDI standard for
    flight rate checking and reservation, airlines
    could register their services into an UDDI
    directory.
  • Travel agencies could then search the UDDI
    directory to find the airline's reservation
    interface.
  • When the interface is found, the travel agency
    can communicate with the service immediately
    because it uses a well-defined reservation
    interface. (by WSDL)

48
WSDL in UDDI
  • WSDL UDDI

49
WSDL in UDDI
  • Since the service interface represents a reusable
    definition of a service, it is published in a
    UDDI registry as a tModel

50
WSDL in UDDI
51
Roadmap
  • Web Services Stack
  • SOAP
  • WSDL
  • UDDI
  • Web Services Composition - BPEL
  • Issues

52
Web Services Stack
BusinessProcesses
Transactions
Quality ofService
Coordination
WS-Security
WS-Reliability
Context
Management
UDDI
Discovery
Description
WSDL
Description
SOAP
Message
XML
HTTP,IIOP, JMS, SMTP
Transport
53
How to leverage the full potential of Web Services
  • Multiple invocation between two or more services
  • All parties - Service providers and service
    clients

SERVICE FLOW
54
Web Services Meet Business Processes
Web Service 1
Web Service 4
Web Service 2
Web Service 5
Web Service 3
Web Service n
55
Example Problem Space
Credit Service
Consolidate Results
PO Service
Client
Inventory Service
56
Business Process Challenges
  • Coordinate asynchronous communication between
    services
  • Correlate message exchanges between parties
  • Implement parallel processing of activities
  • . . .
  • Manipulate/transform data between partner
    interactions
  • Support for long running business transactions
    and activities
  • Provide consistent exception handling
  • . . .

57
Recent History of Business Process Standards
BPML (Intallio et al)
BPSS (ebXML)
WS-Choreography (W3C)
WSCI (Sun et al)
2000/05
2001/03
2001/05
2001/06
2002/03
2002/06
2003/01
2003/04
2002/08
XLang (Microsoft)
WSFL (IBM)
BPEL4WS 1.0 (IBM, Microsoft)
BPEL4WS 1.1(OASIS)
WSCL (HP)
58
Orchestration vs Choreography
  • Orchestration
  • An executable business process describing a flow
    from the perspective and under control of a
    single endpoint (commonly Workflow)
  • Choreography
  • The observable public exchange of messages, rules
    of interaction and agreements between two or more
    business process endpoints

59
Sample Business Process Purchase Order
Sample Purchase Order
Purchase Order Request
Business A
Business B
Purchase Order Acknowledgement
Purchase Order Response
60
From a Choreography Perspective
Public Process
Business A
Business B
PO Request
PO Acknowledgement
PO Response
Choreography The observable public exchange of
messages
61
From an Orchestration Perspective
Private Process
Business A BPEL Workflow
Send PO
Transform
PO Request
From ERP
Receive PO Ack
PO Acknowledgement
To ERP
Receive PO Response
Transform
PO Response
Orchestration A private executable business
process
62
Orchestration and Choreography Together
Generate BPEL Template
Generate BPEL Template
Business B BPEL Workflow
Business A BPEL Workflow
Receive PO
Transform
Send PO
Transform
PO Request
Send PO Ack
Receive PO Ack
PO Acknowledgement
Receive PO Response
Transform
Receive PO Response
Transform
PO Response
Two BPEL workflow templates reflecting a business
agreement
63
WSFL
  • Web Service Flow Language
  • By IBM
  • To fit into the WS Stack naturally
  • XML-based grammar to describe WS interactions

64
Multi-party business processes
  • Operational description
  • ? WSDL (Web Service Description Language)
  • Composition and choreography of WS
  • ? WSFL (Web Service Flow Language)

65
Flow Composition in WSFL (I)
  • Choreograph functionalities of a collection of WS
  • Logic of a business process
  • Specification of the execution sequences of the
    functionalities of services

66
Flow Composition in WSFL (II)
Activities represent units of processing.
  • Business tasks
  • Control flow
  • Data flow

Activities are associated with specific typed
service providers
WS
Control links define execution flow as a directed
acyclic graph
Activities can be mapped to the flow interface
Flow of data is modeled through data links.
67
Global Composition in WSFL
  • Specification of interaction pattern of a
    collection of WS
  • No specification of execution sequence
  • Interactions between service providers and
    service requestors
  • Peer-to-peer interactions
  • Hierarchical interactions

68
Web Services Stack
BusinessProcesses (WS Composition)
Transactions
Quality ofService
Coordination
WS-Security
WS-Reliability
Context
Management
UDDI
Discovery
Description
WSDL
Description
SOAP
Message
XML
HTTP,IIOP, JMS, SMTP
Transport
69
BPML/WSCI
  • ? Complementary efforts
  • Business Process Model Language (Orchestration)
  • describes executable business processes
  • private
  • Web Services Choreography Interface
  • describes messages between collaborating web
    services
  • XML-based language for WS collaboration
  • Public interactions and choreographies between
    services

70
BPML
  • XML-based meta-language
  • Developed by Intalio, SUN, SAP, Versata, CSC,
    SeeBeyond (www.bpmi.org - Business Process
    Management Initiative)
  • Modeling collaborative and transactional business
    processes
  • Relying on a formal model

71
BPML 5 elements
  • Activities
  • performance of simple or complex functions
  • Processes
  • types of complex activities that define its own
    context
  • Contexts
  • environment for the execution of activities
  • Properties
  • information exchange within a context
  • Signals
  • coordination of activities

72
BPML key features
  • basic activities for sending, receiving, and
    invoking services
  • handles conditional, sequential, and parallel
    activities
  • for Long-running processes supporting persistence
  • supports short and long-running transactions
  • robust exception handling mechanisms
  • Recursive composition
  • No automation support! Services and partners to
    be specified at design time

73
WSCI
  • Defines overall choreography of WS taking part in
    an interaction
  • BEA Systems, BPMI.org, Commerce One, Fujitsu
    Limited, Intalio, IONA, Oracle Corporation, SAP
    AG, SeeBeyond Technology Corporation and Sun
    Microsystems.
  • Uses messages
  • No focus on the definition of executable business
    processes (thats what BPML does)
  • Direct correspondence to WSDL
  • Each WSCI unit of work ? WSDL operation
  • WSDL entry points of each service
  • WSCI interactions among WSDL operations

74
WSCI key features (I)
  • Support for basic activities
  • each activity specifies the WSDL operation
    involved
  • use ltactiongt to define a basic request/response
    message
  • use ltcallgt to invoke external services

75
WSCI key features (II)
  • Support for structured activities
  • sequential, parallel, and conditional looping
  • use ltallgt to specify unordered actions to perform
  • Support for business transactions and exceptions
  • transactional contexts can be defined in WSCI
  • any failure in a context will result in all
    transactions in context being rolled back

76
WSCI concepts (I)
  • Interface
  • Observable behaviour of a WS in a message
    exchange with other WS
  • Activities
  • Basic unit of behaviour either atomic or complex
    (composed of other activities)
  • Processes
  • Top-level processes and nested processes
  • Properties
  • Reference a value within an IF definition

77
WSCI concepts (II)
  • Context
  • Environment a set of activities is executed
  • Message correlation
  • Structure of conversations, management of
    multiple conversations with the partner
  • Exceptional behaviour
  • Alternative patterns of behaviour association to
    activities
  • Transactional behaviour
  • Global model
  • Overall message exchange

78
BPEL4WS- BPML
  • BPML is a strict superset of BPEL4WS
  • BPML and BPEL4WS share an identical set of idioms
    and similar syntaxes as the basis of convergence
  • BPML provides a rich and mature language for
    expressing both simple and complex business
    processes

79
BPEL4WS BPML
  • BPML and BPEL4WS are both block-structured
    languages, with the addition of nested processes
    in BPML
  • BPML is based on a logical process model that can
    fully express concurrent, repeating, and dynamic
    tasks
  • BPML builds on the foundation of WSCI for
    expressing public interfaces and choreographies

80
BPEL4WS BPLM/WSCI
  • WSCI/BPML has much richer choreography support
    and backing by W3C working group
  • BPEL4WS has major supporters behind it, with
    developer tools and documentation already
    available

81
BPEL4WS BPLM/WSCI
82
Business Process Execution Language for Web
Services
  • Version 1.0 released by IBM, Microsoft and BEA in
    August 2002
  • Accompanied by WS-Coordination, WS-Transaction
    which remain unsubmitted to standards bodies
  • Version 1.1 submitted to OASIS April 2003
  • XML language for describing business processes
    based on Web services
  • Convergence of XLANG (Microsoft) and WSFL (IBM)
  • Unprecendented industry consensus
  • IBM, Microsoft, Oracle, Sun, BEA, SAP, Siebel

83
Value Proposition
  • Portable business processes
  • Built on top of an interoperable infrastructure
    of Web services
  • Industry wide language for business processes
  • Common skill set and language for developers
  • Choice of process engines
  • Standards lead to competitive offerings

84
Standards Building Blocks of BPEL
BusinessProcesses
Transactions
Quality ofService
Coordination
WS-Security
WS-Reliability
Context
Management
UDDI
Discovery
Description
WSDL
Description
SOAP
Message
XML
HTTP,IIOP, JMS, SMTP
Transport
85
BPEL Depends on WSDL and WSDL Extensions
Service Implementation Definition
Service
Port
Service Interface Definition
Binding
Port types define Operations
Message
Type
86
BPEL Scenario Structure
  • ltprocessgt
  • lt! Definition and roles of process
    participants --gt ltpartnerLinksgt ...
    lt/partnerLinksgt
  • lt!- Data/state used within the process --gt
  • ltvariablesgt ... lt/variablesgt
  • lt!- Properties that enable conversations --gt
  • ltcorrelationSetsgt ... lt/correlationSetsgt
  • lt!- Exception handling --gt
  • ltfaultHandlersgt ... lt/faultHandlersgt lt!-
    Error recovery undoing actions --gt
  • ltcompensationHandlersgt ... lt/compensationHandle
    rsgt
  • lt!- Concurrent events with process itself --gt
  • lteventHandlersgt ... lt/eventHandlersgt
  • lt!- Business process flow --gt
  • (activities)
  • lt/processgt

87
BPEL Activities
  • Primitive Activities
  • ltinvokegt
  • ltreceivegt
  • ltassigngt
  • ltreplygt
  • ltthrowgt
  • ltterminategt
  • ltwaitgt
  • Structured Activities
  • ltsequencegt
  • ltswitchgt
  • ltpickgt
  • ltflowgt
  • ltlinkgt
  • ltwhilegt
  • ltscopegt

88
Partners
  • Declare the Web services and roles used by the
    process
  • Tied to WSDL of the process itself and the
    participating Web services by service link types

Partner 1(the process)
Partner 2
Partner 3
InventoryService
CreditService
PurchaseService
89
Partners in BPEL
BPEL
ltpartnerLinksgt ltpartnerLink namecustomer"
serviceLinkTypelnspurchasePLT
myRolepurchaseService/gt ltpartnerLink
nameinventoryChecker serviceLinkTypelnsinven
toryPLT myRoleinventoryRequestor
partnerRoleinventoryService/gt ltpartnerLink
namecreditChecker serviceLinkTypelnscreditPL
T myRolecreditRequestor
partnerRolecreditService/gt lt/partnerLinksgt
Purchase Process WSDL
Purchase Process PortType
ltpltpartnerLinkType namepurchasePLTgt
ltpltrole namepurchaseServicegt ltpltportType
nametnspurchasePT/gt lt/pltrolegt lt/pltpartner
LinkTypegt
ltportType namepurchasePTgt ltoperation
name"sendPurchase"gt lt/operationgt lt/portTypegt
90
Variables
  • Messages sent and received from partners
  • Persisted for long running interactions
  • Defined in WSDL types and messages

Process
CustomerService
ltvariablegt
ltactivitygt
ltactivitygt
CustomerService
ltvariablegt
Persist/Retrieve
Persist/Retrieve
Persist/Retrieve
Persist
91
Variables in BPEL
BPEL
ltvariablesgt ltvariable namePO
messageTypelnsPOMessage/gt ltvariable
nameInvoice messageTypelnsInvMessage/gt
ltvariable namePOFault messageTypelnsorderFau
ltType/gt lt/variablesgt
Purchase Process WSDL
ltmessage namePOMessagegt ltpart
namecustomerInfo typesnscustomerInfo/gt
ltpart namepurchaseOrder typesnspurchaseOrder
/gt lt/messagegt ltmessage name"InvMessage"gt
ltpart nameIVC typesnsInvoice/gt lt/messagegt lt
message nameorderFaultTypegt ltpart
nameproblemInfo typexsdstring/gt lt/messagegt
92
How is Data Manipulation Done?
  • Using ltassigngt and ltcopygt, data can be copied and
    manipulated between variables
  • ltcopygt supports XPath queries to sub-select data

ltassigngt ltcopygt ltfrom variable"PO"
part"customerInfo"/gt ltto variablecreditReques
t part"customerInfo"/gt lt/copygt lt/assigngt
93
Simple Activities
  • Receive
  • Wait for a partner inbound message
  • Can be the instantiator of the business process
  • Reply
  • Synchronous response to a receive activity
  • Response to the inbound receive from a partner
  • Invoke
  • Issue a request synchronously or asynchronously

94
Structured Activities
  • Ordinary sequential control between activities is
    provided by sequence, switch, and while.
  • Concurrency and synchronization between
    activities is provided by flow.
  • Nondeterministic choice based on external events
    is provided by pick.
  • The pick activity awaits the occurrence of one of
    a set of events and then performs the activity
    associated with the event that occurred

95
Simple Activities Combined with Structured
Activities
ltsequencegt
Receive ltPOgt
ltflowgt
Invoke ltInventoryServicegt
Invoke ltCreditServicegt
lt/sequencegt
Reply ltInvoicegt
96
Sample Activities in BPEL
ltsequencegt ltreceive partnerLinkcustomer
portTypelnspurchaseOrderPT"
operationsendPurchaseOrder variablePO
createInstance"yes" /gt ltflowgt ltinvoke
partnerLinkinventoryChecker portTypelnsinven
toryPT operation"checkINV"
inputVariable"inventoryRequest"
outputVariable"inventoryResponse" /gt ltinvoke
partnerLink"creditChecker" portTypelnscreditPT
" operation"checkCRED"
inputVariable"creditRequest"
outputVariable"creditResponse" /gt lt/flowgt ...
ltreply partnerLinkcustomer portTypelnspurcha
seOrderPT operationsendPurchaseOrder
variableinvoice"/gt lt/sequencegt
97
Links Control Flow
ltflowgt ltlinksgt ltlink name"XtoY"/gt ltlink
name"CtoD"/gt lt/linksgt ltsequence name"X"gt
ltsource linkName"XtoY"/gt ltinvoke name"A"
.../gt ltinvoke name"B" .../gt lt/sequencegt
ltsequence name"Y"gt lttarget linkName"XtoY"/gt
ltreceive name"C"/gt ltsource
linkName"CtoD"/gt lt/receivegt ltinvoke
name"E" .../gt lt/sequencegt ltinvoke
partnerLink"D"gt lttarget linkName"CtoD"/gt
lt/invokegt lt/flowgt
ltflowgt
ltXgt
ltlink XtoYgt
ltYgt
ltlink CtoDgt
lt/flowgt
98
Correlation
POCorrelationltPO_CustId 10gtltPO_OrdId
100gt
initiateyes
initiateyes
Customer
Seller
  • SendPurchase
  • ProcessPurchaseResponse
  • AsynchPurchase
  • AsynchPurchaseResponse

POResponseCorrelations ltPO_CustId
10gtltPO_OrdId 100gt ltInv_VendId
20gtltInv_InvId 200gt
initiateno patternout
initiateno
initiateyes patternout
initiateyes
99
Correlations in BPEL
ltcorrelationSetsgt ltcorrelationSet name"POCorr"
properties"corcustId corordId"/gt
ltcorrelationSet name"InvoiceCorr"
properties"corvendId corinvId"/gt lt/correlationS
etsgt ... ltreceive partnerLinkCustomer
portType"SPPurchaseOrderPT"
operation"AsynchPurchase" variable"PO"gt
ltcorrelationsgt ltcorrelation set"POCorr"
initiate"yes"gt lt/correlationsgt lt/receivegt
... ltinvoke partnerLinkCustomer
portType"SPCustomerPT" operationProcessPurch
aseResponse" inputVariable"POResponse"gt
ltcorrelationsgt ltcorrelation set"POCorr"
initiate"no" pattern"out"gt ltcorrelation
set"InvoiceCorr" initiate"yes" pattern"out"gt
lt/correlationsgt lt/invokegt ...
100
Scopes in BPEL
ltscopevariableAccessSerializable"yesno ...gt
ltvariablesgtlt/variablesgt ltcorrelationSetsgt?
... lt/correlationSetsgt ltfaultHandlersgtlt/faultHa
ndlersgt ltcompensationHandlergt? ...
lt/compensationHandlergt lteventHandlersgtlt/eventHa
ndlersgt (activities) lt/scopegt
  • Provide a shared context for subset of activities
  • Can contain
  • fault handlers
  • event handlers,
  • compensation handler variables
  • correlation sets
  • Can serialize concurrentaccess to variables

101
Long Running Transactions and Compensation
CreditService
ltscopegt
  • CheckCredit
  • ChargeHoldFee
  • CancelHoldFee

InventoryService
  • ReserveInventory
  • CancelReserveInv

lt/scopegt
102
Compensation Handlers in BPEL
ltscopegt ltcompensationHandlergt ltinvoke
partnerLink"Seller" portType"SPPurchasing"
operation"CancelPurchase"
inputVariable"getResponse"
outputVariable"getConfirmation"gt
ltcorrelationsgt ltcorrelation
set"PurchaseOrder" pattern"out"/gt
lt/correlationsgt lt/invokegt lt/compensationHandler
gt ltinvoke partnerLink"Seller"
portType"SPPurchasing"
operation"SyncPurchase"
inputVariable"sendPO"
outputVariable"getResponse"gt ltcorrelationsgt
ltcorrelation set"PurchaseOrder" initiateyes
pattern"out"/gt lt/correlationsgt
lt/invokegt lt/scopegt
103
Exception Handling in BPEL
  • ltfaultHandlersgt catch exception
  • Based on WSDL port defining fault
  • ltfaultHandlersgt can perform activities upon
    invocation
  • ltfaultHandlersgt ltcatch faultName"lnscannotCompl
    eteOrder"
  • faultVariable"POFault"gt
  • ltreply partnerLink"customer"
  • portType"lnspurchaseOrderPT"
  • operation"sendPurchaseOrder"
  • variable"POFault"
  • faultName"cannotCompleteOrder"/gt
  • lt/catchgt
  • lt/faultHandlersgt

104
Just Show Me How to Do it!
  • Compile
  • Package
  • Deploy

. . .
105
Tooling Requirements
  • IDE build your Web services
  • WSDL authoring model your interfaces
  • Schema authoring model your messages
  • Process modeling model your orchestration
  • Packaging and deployment
  • Debugging
  • Monitoring
  • Analyzing

106
Roadmap
  • Web Services Stack
  • SOAP
  • WSDL
  • UDDI
  • Web Services Composition - BPEL
  • Issues

107
Remember BPEL Does Not Solve World Hunger
  • No data transformation
  • No data translation
  • No human workflow
  • No trading partner agreements
  • Silent on existing business protocols (ebXML,
    RosettaNet )
  • Silent on non Web service interactions (e.g. java
    to java)
  • . . .

108
But Remember People Are Trying to Solve World
Hunger
  • W3C WS-Choreography
  • Spec WS-Transaction
  • Spec WS-Coordination
  • Spec WS-Composite Application Framework
  • OASIS WS-Reliability
  • Spec ReliableMessaging
  • Spec WS-Addressing
  • OASIS WS-Security

109
Parting Thoughts
  • Business process portability?
  • Java/J2EE is portable across application servers
  • BPEL is portable independent of Java
  • Programming language in XML?
  • Vendors, big and small, are busy building design
    times and modelers
  • Is BPEL in 2003/2004 J2EE in 1998?
  • Much missing but compelling foundation

110
Problems
  • Complex long running web services.
  • Analysis and verification
  • Automatic composition of complex services.

111
Web Services and the Semantic Web
  • Complementary Goals
  • Semantic Web
  • Its about making links between information more
    intelligent.
  • Web Services
  • Its about improving the way information is
    exchanged

112
Web Services and the Semantic Web
  • Meeting in the middle
  • Semantic Web
  • Provides a formal data-model for Web Services
  • Transactional Web
  • Provides a technology foundation for the Semantic
    Web

113
Research topics
  • Searching for web services
  • Searching for sequence of web services
  • Output of one is input to other
  • Schema matching
  • Trust

114
References
  • James Snell slides, IBM
  • Andrew Siegel, UChicago
  • Xiang Fu slides
  • Katharina Siorpaes slides
  • Oracle

115
References
  • V.d. Aalst, W.M.P., Dumas, M., ter Hofstede,
    A.H.M., Wohed, P. (2002) Pattern-based analysis
    of BPML (and WSCI), http//xml.coverpages.org/Aals
    t-BPML.pdf
  • Cabera, F., Copeland, G., Freund, T., Klein J.,
    Langworthy D., Orchard, D., Shewchuk, J.,
    Storey, T. (2002) Web Service Coordination
    (WS-Coordination), http//www-106.ibm.com/develope
    rworks/library/ws-coor/, 2002
  • Leymann, F. (2001) Web Services Flow Language
    (WSFL1.0), http//www-306.ibm.com/software/solutio
    ns/webservices/pdf/WSFL.pdf
  • Arkin, A., (2002) Business Process Modeling
    Language,
  • Arkin, A., Askary, S., Fording, S., Jekeli, W.,
    Kawaguchi, K., Orchard, D., Pogliani, S., Riemer,
    K., Struble, S., Takacsi-Nagy, P., Trickovic, I.,
    Zimek, S. (2002) Web Service Choreography
    Interface 1.0
Write a Comment
User Comments (0)
About PowerShow.com