Building Web Service using BPWS4J 徐徐徐 2004/7/14
Dec 20, 2015
Building Web Service using BPWS4J
徐天送2004/7/14
References
Suhayi Masud, “Building a Real-World Web Service” part 1~part4, XML Journal, Feb~May 2003
Outline
Web Service Overview BPEL & its Components BPEL Activities Example Conclusion
Web Service Overview Evolution of the Web
Generation 1
Static HTML
HTML
Generation 2
Web Applications
HTMLHTML, XML
HTML, XML
Generation 3
Web Services
Web Service OverviewService-Oriented Architure (SOA)
ServiceRequestor
ServiceDirectory
ServiceProvider
PUBLISH
1
FIND
2
BIND3
Web Service OverviewUnderlying Technology
Ubiquitous Communications: Internet
Universal Data Format: XML
Wire Format: Service Interactions: SOAP
Description: Formal Service Descriptions: WSDL
Directory: Publish & Find Services: UDDI
Web Service OverviewProblem
However, just use Web Service doesn’t support E Business Dialogue
Because Web Service is … Stateless Unreliable
Ubiquitous Communications: Internet
Universal Data Format: XML
Wire Format: Service Interactions: SOAP
Description: Formal Service Descriptions: WSDL
Directory: Publish & Find Services: UDDI
Process: Services Interoperation: BPEL
BPEL
Choreography languages are built on top of the WSDL, it focus on composing stateless Web Services into state-aware e-businessine dialogues.
BPEL defines the choreography of Web Services and the role of the business partners involved in the process.
And the BPWS4J implements BPEL, developed by IBM,
BPEL
BPEL Activities
Basic activities
Invoke Receive Reply
Assign EmptyWait
Throw
!
Sequence Switch While
Structured activities
Flow Pick
Scope
BPEL Activities
Structured Activities Ordinary Sequential Control
sequence, switch, while Concurrency and Synchronization
flow Nondeterministic Choice
pick
Example
Example 1: Authentication
Environment: Tomcat + BPWS4J Test Client: Use Axis SOAP API
Example 1
Web Server(Tomcat)
Id, password
OK or FailureBrowser
Service Provider(BPWS4J)
Call Web Service
Process
receive
invoke
reply
Authentication.bpel
<receive>
<invoke>
<reply>
WSDL
WSDL
Java App
LookupUserService.java
lookupUser.wsdl
Authentication.wsdl
Java App
Client
SOAP
Partner
Variables
Process
Deploy
Deploy OK
Client
Conclusion
Web Service is Stateless, Unreliable, so the BPEL support Process into Web Service.