Soa Bpel Openesb
Soa Bpel Openesb
Agenda
Composite Application BPEL JBI JBI and GlassFish OpenESB Java EE Service Engine Intelligent Event Processor
Composite Applications
etc.
Composite Applications
A way to compose applications from reusable parts Composite applications employ SOA principles
> Features exposed as Web services > Standards-based interaction between services > Are themselves compose'able
Why WSDL?
Enables automation of communication details between communicating partners
Machines can read WSDL Machines can invoke a service defined in WSDL
Simple service providing stock quotes A single operation called GetLastTradePrice Deployed using SOAP 1.1 over HTTP Request takes a ticker symbol of type string Response returns price as a float
8
WSDL Elements
WSDL Elements
Types
Data type definitions Used to describe exchanged messages Uses W3C XML Schema as canonical type system
10
11
WSDL Elements
Messages
Abstract, typed definitions of data being exchanged Abstract description of an action Refers to an input and/or output messages Collection of operations Abstract definition of a service
12
Operations
Port type
WSDL Elements
Binding
Concrete protocol and data format (encoding) for a particular Port type
Protocol examples: SOAP 1.1 over HTTP or SOAP 1.1 over SMTP Encoding examples: SOAP encoding, RDF encoding
Port
Defines a single communication endpoint Endpoint address for binding URL for HTTP, email address for SMTP Aggregate set of related ports
14
Service
15
BPEL
which need to be performed in the following order > Getting a price quote > Purchase a ticket > Confirmation and cancellation
18
Partner Servic
Partner Servic
19
BPEL Activities
Basic Activities <invoke> <receive> <reply> <assign> <throw> <wait> <empty> <exit> Structured Activities <if> <while> <repeatUntil> <foreach> <pick> <flow> <sequence> <scope>
22
<receive>
> To do a blocking wait for a matching message to arrive > Can be the instantiator of the business process
<reply>
> To send a message in reply to a message that was received
through a <receive> > The combination of a <receive> and a <reply> forms a request-response operation on the WSDL portType for the process
23
<flow>
> Perform activities in parallel
<if>
> Conditional choice of activities
<scope>
> Enclose multiple activities in a single scope
24
Invoke <InventoryService>
Invoke <CreditService>
<flow>
Reply <Invoice>
</sequence>
25
26
27
28
Demo:
29
It then performs travel reservation business process talking to three partner web services
> Airline reservation partner web service > Hotel reservation partner web service > Vehicle reservation partner web service
The three partner web services are implemented as EJB based web services
30
Demo Scenario
See Travel Reservation business process as a BPEL document See WSDL documents of partner web services and of the BPEL process web service Build and deploy the application over GlassFish and JBI server Test the application with test requests Perform source-code debugging on BPEL
31
33
Lowest Bid
Bid
Purchase Service
Ship Notice
Ship Notice
36
Buyer Conversation
Supplier Conversation
Transaction Fees Supplier Routing Supplier Selection Buyer Credit Product Conversion
37
Ro u
38
What Is JBI?
JBI provides a standard application integration framework JBI to Application integration is what Java EE is to Enterprise application
41
Why JBI?
Point-to-point integration model is not scalable and hard to maintain The traditional EAI model has its problems > Proprietary integration server > Vendor lock-in > High barrier for entry for small, independent, innovative ISV's providing best-of-breed solutions There is a need for an open standard framework for application integration
42
What Is JBI?
Standard meta-container for integrating service containers
> Service containers can host
any services (service units) > Business logic service > System services > Service can be located locally or remotely
Plug-in architecture
> Service Engines (SE) Local
Transformation (XSLT)
WSDL
J2EE Platform
WSDL
WSDL
WSDL
WSDL
AS2
JMS
J2EE Platform
44
System Management
XQuery
WS D So L/ ap
Install
BP EL EJ B XQ ue ry Ru le
BP EL
Ro u Ta ting ble
Rules
Process
JavaEE
Deploy
XS LT
Composite Service
45
OpenESB
47
OpenESB Architecture
48
Design-Time IDE
App Server
Java EE EJBs Servlets
Runtime
XSLT SE
JBI Bus
FTP BC FTP Many More BC BCs
BPEL Editor
Open Standard Based Service Bus
BPEL Monitor
XSLT Editor
XSLT Monitor
App Server
IEP Editor
FTP BC
JBI Bus
XSLT SE FTP Many More BC SEs
49
runtime in it
51
52
Usage Scenario
55
JBI-based Infrastructure
56
57
Architecture Refactoring
58
RulesEngine
JavaEE
59
JBI Components
Service Engines Binding Comps Other
> > > > > > >
> > > > > > > > > > >
MQSeries BC HL7 BC SAP BC SMTP BC HTTP BC JMS BC File BC CICS BC DCOM BC CORBA BC ...
Clustering CASA JBI Mock WSIT Tech CAM Aspect SE Encoding SE Rules SE Scripting SE
61
In Progress
> > > > >
open-esb.dev.java.net/Components.html
62
63
BPEL Module project XSLT Module project SQL Module project Composite Application project IEP Module project Worklist Module project ETL (Extract, Transform, and Load) EDM (Enterprise Data Mashup) And more
65
66
Within a BPEL Module project, you can author a business process compliant with the WS-BPEL 2.0 language specification. Will be added to a Composite application as a JBI module
67
The Composite Application Project can also be used to create and execute test cases that can then be run, in JUnit fashion, against the deployed BPEL processes.
68
(BPEL, XSLT, IEP, SQL, etc.) Configure external/edge access protocols (SOAP, JMS, SMTP, and others) Build JBI deployment packages Deploy the application image to the target JBI server Monitor the status of JBI server components and applications
69
70
Demo:
71
Java EE SE
JavaEE SE
Ideal place to execute complex business logic Bridge between JavaEE container and JBI container Provides support for
> Transactions > Resource Pooling > Security
Code re-use Invoke your EJBs/web applications from OpenESB components (BPEL SE) Ability to expose your EJB/Web applications to multiple transports (using BCs) just add bindings to your WSDL
73
BPEL SE
WSD L WSD L BPEL process
HTTP BC
WSDL
HL7
HL7 BC
WSDL
N M R
BPEL process
WSD L WSD L
EE SE
ejb.jar
HTTP
SAP BC
WSDL
RMI application.ear
EE Container
app-a.ear ejb-b.jar
ejb-c.jar
app-c.ear
HTTP RMI
Network layer SOAP/HTTP JAXWS Unmarshal <xml> Create DOM JAXB WS.helloWorld(name) 74
BPEL SE
BPEL process
HTTP
HL7
HL7 BC
WSDL
N M R
BPEL process
WSD L WSD L
EE SE
ejb.jar RMI application.ear
SAP BC
WSDL
Advantages:
> Performance > Transaction propagation > Security context propagation
75
Java EE Service Engine: Functions as Bridge between App Server and JBI Runtime Env.
78
Demo:
83
85
JBI Containter
Binding Component
86
Demo:
87
Summary
Summary
SOA enables flexible and agile enterprise application architecture Services can be created and used using Java EE BPEL is a service orchestration language for creating composite applications Services can be re-implemented using other technologies as long as service interfaces are preserved without changing consumers Java Business Integration (JBI) is the enabling infrastructure
89