Top Banner
Building Web Service using BPWS4J 徐徐徐 2004/7/14
21

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.

Dec 20, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 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.

Building Web Service using BPWS4J

徐天送2004/7/14

Page 2: 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.

References

Suhayi Masud, “Building a Real-World Web Service” part 1~part4, XML Journal, Feb~May 2003

Page 3: 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

Page 4: 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.

Web Service Overview Evolution of the Web

Generation 1

Static HTML

HTML

Generation 2

Web Applications

HTMLHTML, XML

HTML, XML

Generation 3

Web Services

Page 5: 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.

Web Service OverviewService-Oriented Architure (SOA)

ServiceRequestor

ServiceDirectory

ServiceProvider

PUBLISH

1

FIND

2

BIND3

Page 6: 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.

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

Page 7: 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.

Web Service OverviewProblem

However, just use Web Service doesn’t support E Business Dialogue

Because Web Service is … Stateless Unreliable

Page 8: 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.

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

Page 9: 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.

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,

Page 10: 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.

BPEL

Page 11: 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.

BPEL Activities

Basic activities

Invoke Receive Reply

Assign EmptyWait

Throw

!

Sequence Switch While

Structured activities

Flow Pick

Scope

Page 12: 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.

BPEL Activities

Structured Activities Ordinary Sequential Control

sequence, switch, while Concurrency and Synchronization

flow Nondeterministic Choice

pick

Page 13: 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.

Example

Example 1: Authentication

Environment: Tomcat + BPWS4J Test Client: Use Axis SOAP API

Page 14: 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.

Example 1

Web Server(Tomcat)

Id, password

OK or FailureBrowser

Service Provider(BPWS4J)

Call Web Service

Process

receive

invoke

reply

Page 15: 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.

Authentication.bpel

<receive>

<invoke>

<reply>

WSDL

WSDL

Java App

LookupUserService.java

lookupUser.wsdl

Authentication.wsdl

Java App

Client

SOAP

Page 16: 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.

Partner

Variables

Page 17: 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.

Process

Page 18: 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.

Deploy

Page 19: 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.

Deploy OK

Page 20: 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.

Client

Page 21: 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.

Conclusion

Web Service is Stateless, Unreliable, so the BPEL support Process into Web Service.