Upload
carmel-sanders
View
215
Download
2
Tags:
Embed Size (px)
Citation preview
Fall 2007 http://www.cis.ksu.edu 1
CIS 764 Database Systems Engineering
L12.2: Web Services ++
Web service as an enterprise “component”
Distributed business processes build using web services.
Fall 2007 http://www.cis.ksu.edu 2
CIS 764 Database Systems Engineering
Objects, components, web-services:
R. Sessions, "Fuzzy Boundaries: Objects, Components, and Web Services", ACM Queue, Jan. 04 http://www.acmqueue.org/modules.php?name=Content&pa=showpage&pid=246
factors: location , environment, protocol:
* entity and the client in same process => objects
* different processes, same environment => component
(EJB, dotNet managed components )
* different processes, different environments => service (web service, rpc )
Fall 2007 http://www.cis.ksu.edu 3
CIS 764 Database Systems Engineering
Web service is access of object methods for remote use (by client or other “components” via web protocols.
Why remote use ? (vs local ejb ?)
What kind application architecture?
Why web protocols? (vs rmi, rpc ?)
Fall 2007 http://www.cis.ksu.edu 4
CIS 764 Database Systems Engineering
one issue is efficiency:
object << component << service
Then why the focus, growth of web services?
Fall 2007 http://www.cis.ksu.edu 5
CIS 764 Database Systems Engineering
"Web Services Protocol Stack" , Wikipedia http://en.wikipedia.org/wiki/Web_Services_Protocol_Stack http://en.wikipedia.org/wiki/SOAP http://en.wikipedia.org/wiki/Web_Services_Description_Language http://en.wikipedia.org/wiki/Universal_Description_Discovery_and_Integration http://en.wikipedia.org/wiki/Business_Process_Execution_Language
Service/transport layer …. Http, …Message encoding layer … XML: SOAP , RPC
Description protocol ……. XML: WSDLDiscovery service ……….. XML base, business services directory
Business process model … BPEL
Fall 2007 http://www.cis.ksu.edu 6
CIS 764 Database Systems Engineering
http://www.w3schools.com/soap/soap_example.asp POST /InStock HTTP/1.1 Host: www.example.org Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn
<?xml version="1.0"?> <soap:Envelope xmlns:soap=http://www.w3.org/2001/12/soap-envelope soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPrice> <m:StockName>IBM</m:StockName> </m:GetStockPrice> </soap:Body> </soap:Envelope>
Fall 2007 http://www.cis.ksu.edu 7
CIS 764 Database Systems Engineering
Response:
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: nnn
<?xml version="1.0"?> <soap:Envelope xmlns:soap=http://www.w3.org/2001/12/soap-envelope soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"> <soap:Body xmlns:m="http://www.example.org/stock"> <m:GetStockPriceResponse> <m:Price>34.5</m:Price> </m:GetStockPriceResponse> </soap:Body> </soap:Envelope>
Fall 2007 http://www.cis.ksu.edu 8
CIS 764 Database Systems Engineering
Web Service Description Language: partial example http://www.w3schools.com/wsdl/wsdl_documents.asp syntax pattern http://www.w3schools.com/wsdl/wsdl_syntax.asp
Structure
Element Defines <portType> The operations performed by the web service <message> The messages used by the web service <types> The data types used by the web service <binding> The communication protocols used by the web service
Fall 2007 http://www.cis.ksu.edu 9
CIS 764 Database Systems Engineering
Partial example:
<message name="getTermRequest"> <part name="term" type="xs:string"/> </message>
<message name="getTermResponse"> <part name="value" type="xs:string"/> </message>
<portType name="glossaryTerms"> <operation name="getTerm"> <input message="getTermRequest"/> <output message="getTermResponse"/> </operation></portType>
Fall 2007 http://www.cis.ksu.edu 10
CIS 764 Database Systems Engineering
Universal Description, Discovery, and Integration service, and XML registry, with three parts: White Pages — address, contact, and known identifiers; Yellow Pages — industrial categorizations w standard taxonomies; Green Pages — technical info about services.
e.g. UDD4J Java implementation http://uddi4j.sourceforge.net/
Fall 2007 http://www.cis.ksu.edu 11
CIS 764 Database Systems Engineering
Example Oracle WS tutorials:
Creating a Web Service from an EJB (reverse engineering) http://www.cis.ksu.edu/~hankley/d764/Oracle/Labs/J2EE_Track/Lab2WebServices/WebServicesLab.htm
Developing, Deploying, and Managing a Web Service Using JDeveloper http://www.oracle.com/technology/obe/obe1013jdev/ws/wsandascontrol.htm
calendar service, direct access in OC4J, (rev. engr --service from class)
Developing a Web Service with JDeveloper (fwd engineering) http://www.oracle.com/technology/obe/obe1013jdev/preview10131_wstopdown/wstopdown.htm
credit rating service, direct service in OC4J, (component from contract)
Securing Web Service using JDeveloper http://www.oracle.com/technology/products/jdev/101/howtos/securews/index.html
Fall 2007 http://www.cis.ksu.edu 12
CIS 764 Database Systems Engineering
SOA - Service Oriented Architecture:http://en.wikipedia.org/wiki/Serviceoriented_architecture#SOA_and_Business_Architecture
building of enterprise application based on web servicesand supporting components.
Is it different than web-applications architecture (J2EE web apps) ?
Fall 2007 http://www.cis.ksu.edu 13
CIS 764 Database Systems Engineering
SOA - Service Oriented Architecture:http://en.wikipedia.org/wiki/Serviceoriented_architecture#SOA_and_Business_Architecture
building of enterprise application based on web servicesand supporting components.
Is it different than web-applications architecture (J2EE web apps) ?
Ans: focus on business processes (vs single app / ops) focus on sharing services/ components
Fall 2007 http://www.cis.ksu.edu 14
CIS 764 Database Systems Engineering
major enterprise design aspect is on business process modeling (sometimes called “workflow” )
e.g. http://en.wikipedia.org/wiki/Business_Process_Modeling_Notation
Interaction Patterns http://sky.fit.qut.edu.au/~dumas/ServiceInteractionPatterns/
Oracle SOA center:http://www.oracle.com/technology/tech/soa/index.html
Fall 2007 http://www.cis.ksu.edu 15
CIS 764 Database Systems Engineering
Fall 2007 http://www.cis.ksu.edu 16
CIS 764 Database Systems Engineering
distinction between “orchestration” … constraint behavior for one participantvs “choreography”… coordination between various parties
in a sense, UML sequence model is orchestration (a behavior model) UML swim lane process model is choreography (a process coordination model)
Fall 2007 http://www.cis.ksu.edu 17
CIS 764 Database Systems Engineering
BPEL .. an executable control language http://en.wikipedia.org/wiki/BPEL
Other slides:http://www.bptrends.com/publicationfiles/BPEL4ProgArchies.pdf
Discussion:http://elementallinks.typepad.com/bmichelson/2005/09/view_bpel_proce.html
Patterns:http://is.tm.tue.nl/research/patterns/download/Oracle_BPEL_v.10.1.2.pdf
BPELJ …Java implemenationhttp://ftpna2.bea.com/pub/downloads/ws-bpelj.pdf …. More examples / discussion
Fall 2007 http://www.cis.ksu.edu 18
CIS 764 Database Systems Engineering
Oracle BPEL Process Manager http://download-west.oracle.com/docs/cd/B14099_19/integrate.1012/b14448/introbpel.htm BPEL tutorial:Model and Deploy the Loan Flow Process using Oracle BPEL Process Manager
http://www.oracle.com/technology/obe/obe_as_1012/integration/bpel/bpel_jdev/bpel_jdev.htm
Fall 2007 http://www.cis.ksu.edu 19
CIS 764 Database Systems Engineering
end