WORF:  Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting
Agenda <ul><li>J2EE and Web Services </li></ul><ul><li>Introduction </li></ul><ul><ul><li>About Web Services </li></ul></u...
Introduction Web Services and  Stored Procedures
Web Services - Definition <ul><li>Web Services are </li></ul><ul><li>“ Software applications identified by a URI, whose in...
Web Services - Standards <ul><li>and </li></ul><ul><li>based on open standards </li></ul><ul><li>XML - eXtensible Markup L...
Webservices - Execution
Web Services - Execution <ul><li>Step 1: Define and build Web Service (method signature) </li></ul><ul><li>function/operat...
Web Services - Why? <ul><li>Advantages: </li></ul><ul><li>loosely coupled and coarse-grained service granularity </li></ul...
About Stored Procedures ... <ul><li>Stored Procedures </li></ul>
Advantages of Stored Procedures <ul><li>Faster execution </li></ul><ul><li>Reduced network traffic </li></ul><ul><li>Modul...
Writing Stored Procedures <ul><li>Languages: Java, C,… </li></ul><ul><li>Generation with GUI:  </li></ul><ul><ul><li>Store...
Architecting Web Services
Common Web Service Architectures
Server component model  Client invocation model <ul><li>Server component model </li></ul><ul><ul><li>Request-Response and ...
WSDL, SOAP, UDDI Constructs <ul><li>SOAP provides a myriad of constructs! </li></ul><ul><li>Consider: </li></ul><ul><li>us...
Stored Procedures and Web Services
WORF - Basic Architecture WORF: a piece of software plugged in the Websphere application server used by all DB2 Web Servic...
The DB2 XML Extender <ul><li>Offers … </li></ul><ul><ul><li>Stored Procedures </li></ul></ul><ul><ul><li>Triggers </li></u...
Two methods (i) XColumn Column data = XML documents DB2 used as XML document repository Validation of XML docs Storing XML...
Two methods (ii) XCollection DB2 used as  data base (no XML in DB2) XML is transport language   Validation of XML docs Dec...
DADs <ul><li>XML document </li></ul><ul><ul><li>Validate </li></ul></ul><ul><ul><li>DTD-id </li></ul></ul><ul><ul><li>Meth...
DB2 Web Services WORF:   software plugged in the WebSphere application server used by all DB2 Web Service enterprise appli...
Web Service Object Runtime Framework (WORF) <ul><li>Provides for: </li></ul><ul><ul><li>Resource-based deployment and invo...
WORF configuration files <ul><li>description of  deployed service </li></ul><ul><li>servlet mapping </li></ul><ul><li>serv...
DADX  Document Access Definition eXtension <ul><ul><li>XML document </li></ul></ul><ul><ul><li>a DADX  for each Web Servic...
Possible DADX operations / DB2 manipulations <ul><ul><li>select </li></ul></ul><ul><ul><li>insert  </li></ul></ul><ul><ul>...
SOAP request processing by WORF <ul><li>Processing sequence: </li></ul><ul><ul><li>loads the DADX </li></ul></ul><ul><ul><...
DB2 Web Services WORF:  software plugged in the WebSphere application server used by all DB2 Web Service enterprise applic...
Why will Web Services Succeed? <ul><li>Because: </li></ul><ul><ul><li>Implementation de-coupled from interface </li></ul><...
Upcoming SlideShare
Loading in …5
×

PPT-file 821 KB

470 views
398 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
470
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

PPT-file 821 KB

  1. 1. WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting
  2. 2. Agenda <ul><li>J2EE and Web Services </li></ul><ul><li>Introduction </li></ul><ul><ul><li>About Web Services </li></ul></ul><ul><ul><li>About Stored Procedures </li></ul></ul><ul><li>Architecting Web Services </li></ul><ul><ul><li>Understand application requirements </li></ul></ul><ul><ul><li>The server component model - the client invocation model </li></ul></ul><ul><ul><li>WSDL, SOAP and UDDI constructs </li></ul></ul><ul><li>DB2 Stored Procedures and Web Services </li></ul><ul><ul><li>WORF </li></ul></ul><ul><ul><li>DB2 XML Extender </li></ul></ul><ul><ul><li>Web Services </li></ul></ul>
  3. 3. Introduction Web Services and Stored Procedures
  4. 4. Web Services - Definition <ul><li>Web Services are </li></ul><ul><li>“ Software applications identified by a URI, whose interfaces and bindings are are capable of being defined, described and discovered by XML artifacts, supporting direct interactions with other software applications using XML based messages via internet-based protocols.” </li></ul><ul><li>... </li></ul>
  5. 5. Web Services - Standards <ul><li>and </li></ul><ul><li>based on open standards </li></ul><ul><li>XML - eXtensible Markup Language </li></ul><ul><li>SOAP - Simple Object Access Protocol </li></ul><ul><li>WSDL - Web Services Description Language </li></ul><ul><li>UDDI - Universal Description, Discovery and Integration </li></ul>
  6. 6. Webservices - Execution
  7. 7. Web Services - Execution <ul><li>Step 1: Define and build Web Service (method signature) </li></ul><ul><li>function/operation(s), parameters </li></ul><ul><li>return value, errors/exceptions </li></ul><ul><li>Step 2: Deploy Web Service </li></ul><ul><li>to SOAP router </li></ul><ul><li>deployment descriptor </li></ul><ul><li>Step 3: Create client application </li></ul><ul><li>Java calls SOAP API </li></ul><ul><li>Step 4: Execute the client application </li></ul>
  8. 8. Web Services - Why? <ul><li>Advantages: </li></ul><ul><li>loosely coupled and coarse-grained service granularity </li></ul><ul><li>programming language independent, interoperable </li></ul><ul><li>transport independent </li></ul><ul><li>mutiple invocation styles: static or dynamic </li></ul><ul><li>multiple communication styles: synchronous or asynchronous </li></ul><ul><li>open, extensible, standards based: based on XML </li></ul><ul><li>composable </li></ul>
  9. 9. About Stored Procedures ... <ul><li>Stored Procedures </li></ul>
  10. 10. Advantages of Stored Procedures <ul><li>Faster execution </li></ul><ul><li>Reduced network traffic </li></ul><ul><li>Modular programming </li></ul><ul><li>Increased security </li></ul>
  11. 11. Writing Stored Procedures <ul><li>Languages: Java, C,… </li></ul><ul><li>Generation with GUI: </li></ul><ul><ul><li>Stored Procedure Builder (v7) </li></ul></ul><ul><ul><li>Development Center (v8) </li></ul></ul><ul><li>SQL/PL </li></ul>DB2 UDB v8 supports the dynamic CALL statement
  12. 12. Architecting Web Services
  13. 13. Common Web Service Architectures
  14. 14. Server component model Client invocation model <ul><li>Server component model </li></ul><ul><ul><li>Request-Response and RPC paradigms: use solutions with basic synchronous blocking behaviour e.g. Java classes, EJBs, stored procedures </li></ul></ul><ul><ul><li>Fire and Forget: JMS architecture and MDBeans for asynchronous behaviour </li></ul></ul><ul><li>Client invocation model </li></ul><ul><ul><li>Static Proxy, static proxy generated, based on WSDL </li></ul></ul><ul><ul><li>Dynamic Proxy </li></ul></ul><ul><ul><li>Dynamic Invocation Interface </li></ul></ul>
  15. 15. WSDL, SOAP, UDDI Constructs <ul><li>SOAP provides a myriad of constructs! </li></ul><ul><li>Consider: </li></ul><ul><li>usage styles </li></ul><ul><ul><li>SOAP ‘RPC’ style </li></ul></ul><ul><ul><li>SOAP Document style </li></ul></ul><ul><li>encoding styles </li></ul><ul><ul><li>encoded </li></ul></ul><ul><ul><li>literal </li></ul></ul>
  16. 16. Stored Procedures and Web Services
  17. 17. WORF - Basic Architecture WORF: a piece of software plugged in the Websphere application server used by all DB2 Web Service enterprise applications.
  18. 18. The DB2 XML Extender <ul><li>Offers … </li></ul><ul><ul><li>Stored Procedures </li></ul></ul><ul><ul><li>Triggers </li></ul></ul><ul><ul><li>User Defined Functions (UDF) </li></ul></ul><ul><ul><li>User Defined Datatypes (UDT) </li></ul></ul><ul><ul><li>Supporting tables </li></ul></ul><ul><li>… to extend DB2 functionality! </li></ul>
  19. 19. Two methods (i) XColumn Column data = XML documents DB2 used as XML document repository Validation of XML docs Storing XML docs Search through XML docs
  20. 20. Two methods (ii) XCollection DB2 used as data base (no XML in DB2) XML is transport language Validation of XML docs Decompose XML docs into data Compose XML docs from data
  21. 21. DADs <ul><li>XML document </li></ul><ul><ul><li>Validate </li></ul></ul><ul><ul><li>DTD-id </li></ul></ul><ul><ul><li>Method </li></ul></ul><ul><ul><li>Detailed description of data mapping: DB2 vs. XML </li></ul></ul>
  22. 22. DB2 Web Services WORF: software plugged in the WebSphere application server used by all DB2 Web Service enterprise applications.
  23. 23. Web Service Object Runtime Framework (WORF) <ul><li>Provides for: </li></ul><ul><ul><li>Resource-based deployment and invocation, i.e. </li></ul></ul><ul><ul><ul><li>DADX based </li></ul></ul></ul><ul><ul><ul><li>optionally other resources that help define the web service </li></ul></ul></ul><ul><ul><li>Automatic service redeployment </li></ul></ul><ul><ul><li>Automatic WSDL and XSD generation </li></ul></ul><ul><ul><li>Automatic documentation </li></ul></ul><ul><ul><li>Automatic test page generation </li></ul></ul>
  24. 24. WORF configuration files <ul><li>description of deployed service </li></ul><ul><li>servlet mapping </li></ul><ul><li>service specific config </li></ul><ul><li>database specs </li></ul><ul><li>engine </li></ul>
  25. 25. DADX Document Access Definition eXtension <ul><ul><li>XML document </li></ul></ul><ul><ul><li>a DADX for each Web Service </li></ul></ul><ul><ul><li>Web Service meths: DADX operations </li></ul></ul><ul><ul><li>Web Service documentation </li></ul></ul><ul><ul><li>Query Description </li></ul></ul><DADX xmlns=&quot;http://schemas…&quot;> <operation name=&quot;listPersons&quot;> <query> <SQL_query>SELECT pfname, plname FROM db2.persons</SQL_query> </query> </operation> <operation name=&quot;InsertPerson&quot;> <call> <SQL_call>call db2.InPers(:lname, :com) </SQL_call> <parameter name=&quot;lname&quot; type=&quot;xsd:string&quot;/> <parameter name=&quot;com&quot; type=&quot;xsd:string” kind=&quot;out&quot;/> </call> </operation> </DADX>
  26. 26. Possible DADX operations / DB2 manipulations <ul><ul><li>select </li></ul></ul><ul><ul><li>insert </li></ul></ul><ul><ul><li>update </li></ul></ul><ul><ul><li>delete </li></ul></ul><ul><ul><li>call </li></ul></ul><ul><ul><li>retrieveXML </li></ul></ul><ul><ul><li>storeXML </li></ul></ul>SQL based queries XML based queries
  27. 27. SOAP request processing by WORF <ul><li>Processing sequence: </li></ul><ul><ul><li>loads the DADX </li></ul></ul><ul><ul><li>optionally loads a DAD file </li></ul></ul><ul><ul><li>replaces query parameters </li></ul></ul><ul><ul><li>connects to DB2 </li></ul></ul><ul><ul><li>runs the SQL statement </li></ul></ul><ul><ul><li>commits the database transaction </li></ul></ul><ul><ul><li>formats the result into XML </li></ul></ul><ul><ul><li>returns the response in a SOAP envelope </li></ul></ul>
  28. 28. DB2 Web Services WORF: software plugged in the WebSphere application server used by all DB2 Web Service enterprise applications.
  29. 29. Why will Web Services Succeed? <ul><li>Because: </li></ul><ul><ul><li>Implementation de-coupled from interface </li></ul></ul><ul><ul><ul><li>any language </li></ul></ul></ul><ul><ul><ul><li>open standard transport ‘distributed’ technology </li></ul></ul></ul><ul><ul><li>Optimized for Internet </li></ul></ul><ul><ul><ul><li>standard based </li></ul></ul></ul><ul><ul><li>‘ No’ assumptions about technology at either side of the chain </li></ul></ul><ul><ul><li>Backed by key software vendors: IBM, Oracle, MS, etc. </li></ul></ul>

×