Adding Data into your SOA with WSO2 WSAS


Published on

This webinar (done in December,2007) shows how the new Data Services capability in WSO2's Web Services Application Server can become a key component in your SOA/Data strategy. Using simple screens and a basic knowledge of SQL, any database programmer or administrator can configure and expose Data Services. As well as major databases such as Oracle, DB2 and MySQL, you can also extract data from Excel and CSV files.

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Adding Data into your SOA with WSO2 WSAS

  1. 1. Adding Data S ervices into your S OA with WS O2 WS AS G len Daniels (g len@ ws & S umedha R ubas ing he (s umedha@ ws
  2. 2. WS O2 B ackg round ● Founded in August 2005 by leaders in XML and Web services technologies & standards, and open source ● Building complete SOA platform, all 100% open source ● Founders / leading contributors to all key Apache Web services / SOA projects ● Selling support, training and services around the software & solutions ● Global corporation with R&D center in Sri Lanka and offices in US & UK, totaling 60+ employees
  3. 3. Today's Talk : Data S ervices ● Data is the lifeblood of the Enterprise – But too often it's trapped in batch-land – Bottlenecks can delay realization of SOA benefits ● Service partitioning can confuse things – Service objects don't “own” things like “Customer” ● An explicit Data Service layer is convenient and effective
  4. 4. How C an Data S ervices Help? ● Ability to access most up-to-date data using a service call (brings you to the front of the wave) ● Single layer for accessing all the data needs of your SOA ● QoS / Security pattern is identical for data ● Optimization efforts will be available to all the service consumers ● Developer productivity – save time on developing similar data access mechanism for different applications
  5. 5. S umedha R ubas ing he ● At WSO2 since Nov 2006 ● Deals w/both customers and code ● Key contributor to Axis2, WSAS ● Technical lead for Data Services
  6. 6. Problem ● Data locked away in monolithic application silos ● No unified away of accessing data C halleng es ● SOA demands access to data in heterogeneous data sources ● Business users does not differentiate between application functionality or data access ● Financial & budgeting constraints
  7. 7. Alternative approaches to data acces s in a S OA ● Direct access to databases (JDBC,ODBC,..etc) ● Use of O/R mapping frameworks (Hibernate, Ibatis,...) ● Enterprise Java Beans (EJBs) ● CORBA ● Problem – Each approach demands different way of access – Developer time spent on data access, rather than implementing business functionality ● Thus comes the need for Data services
  8. 8. Data S ervices in a nuts hell A mechanism to take relational data locked away in databases and make them available as WS-* style Web services or as a set of REST style web resources
  9. 9. WS O2 Data S ervices , WS AS & Axis 2 ● WSAS is an enterprise ready web services application server built on top of Axis2 ● Data Services run on top of WSO2 Web Services Application Server (WSAS) ● First appeared on WSAS 2.0 ● Growing feature list with every new release ● Open source product
  10. 10. Data S ervices Architecture ● Data Services are SOA equivalent of the Data Access Object(DAO) Pattern ● DS deal with different data sources similar to what DAO does ● But, DS operate on a different layer
  11. 11. Data S ervices Deployer Architecture
  12. 12. Data S ervices Des cription Lang uag e ● In-house developed language for writing data services ● Maps service requests to your SOA to queries operating on your database objects (tables, views, procedures & functions) ● Maps query results to XML responses ● Let's see a simple example
  13. 13. S imple example ● Expose a table in MySQL database as a service ● Table Structure TABLE Employees( employeeNumber INTEGER, lastName VARCHAR(50), firstName VARCHAR(50), extension VARCHAR(10), email VARCHAR(100), officeCode VARCHAR(10), reportsTo INTEGER, jobTitle VARCHAR(50)); ● Create a service to get contact information using lastName – ContactInfoService -> getContactInformation(String name)
  14. 14. S imple example : config uration file <data name=quot;C ontactInfoS ervicequot;> <config> <property name=quot;;>com.mys ql.jdbc.Driver</property> <property name=quot;;>jdbc:mys ql://localhos t:3306/datas ervice_s ample</property> <property name=quot;;>ds us er</property> <property name=quot;;>us er123</property> <property name=quot;;>1</property> <property name=quot;;>5</property> </config> <query id=quot;contactInfoQueryquot;> <sql>s elect firs tName,las tName,extens ion,email from employees where las tName = ? </sql> <param name=quot;namequot; sqlType=quot;S TR INGquot; /> <result element=quot;E mployees quot; rowName=quot;C ontactInfoquot;> <attribute name=quot;Las tNamequot; column=quot;las tNamequot; /> <element name=quot;Firs tNamequot; column=quot;firs tNamequot; /> <element name=quot;E xtens ionquot; column=quot;extens ionquot; /> <element name=quot;E mailquot; column=quot;emailquot; /> </result> </query> <operation name=quot;g etC ontactInformationquot;> <call-query href=quot;contactInfoQueryquot; > <with-param name=quot;namequot; query-param=quot;namequot; /> </call-query> </operation> </data>
  15. 15. S imple example – G UI wizard s tep (1)
  16. 16. S imple example – G UI wizard s tep (2)
  17. 17. S imple example – G UI wizard s tep (3)
  18. 18. WS DL for the S ervice
  19. 19. Invoking the S ervice – HTTP binding
  20. 20. Invoking the S ervice – us ing TryIt Services > C ontactI nfoService > TryI t
  21. 21. Data S ervices Des cription Lang uag e ● Available online @
  22. 22. Full C R UD operation s upport
  23. 23. Full C R UD operation s upport
  24. 24. S upported Data S ources ● Relational Databases – Any database accessible via JDBC – Tables, views, stored procedures, functions ● URL accessible Comma Separated Value (CSV) files ● Microsoft Excel (97 – 2003) spread sheets – operation per work book ● Coming up – Support for LDAP Trees
  25. 25. S upported Data S ources
  26. 26. B uilt-in connection pooling ● Apache DBCP as the built-in pooling manager ● Greatly increases the performance ● Ability to connect to Data sources bound to JNDI name ● Use a pooling manager of your choice
  27. 27. S ecuring your s ervices ● WSAS supports WS-Security using Apache Rampart ● Control who accesses your data services using user name tokens ● Transmit responses over HTTPS
  28. 28. 'Try It' for tes ting s ervices ● Test your data services without leaving WSAS console ● Ability to dynamically change the configuration & see the results
  29. 29. WS AS Manag ement C ons ole ● Monitor system usage ● Statistics gathered include: – Service usage – Endpoint load – Overall system performance ● Enable tracing of a running system and capture service level message traces ● Configure system level logging and monitor logs directly from the console ● Monitoring via JMX
  30. 30. Many more features ● Access Throttling ● High availability via Clustering – Tribes clustering module ● Caching ● Reliable Messaging
  31. 31. Advantag es ● Portability ● Unified access to heterogeneous data sources ● Full WS-* stack support ● Less hassle to DBAs – no need to open up database over network ● Very simple – even a DBA can configure it ● Ability to optimize underlying queries with minimal (or none) disruption to service consumers ● Single layer to access data requirements of SOA – optimization effects every consumer
  32. 32. G etting s tarted ... ● Download WSAS ( ● bin/ ● Browse https://localhost:9443 ● Navigate to Services > Define Data Service ● samples/DataServices
  33. 33. G etting s tarted ... ● Many online resources on WSO2 Oxygen Tank ( ● How to use MySQL 5 INOUT variables in Data Services? ( ● How to call MySQL 5 Stored Function from Data Service? ( ● How to call MySQL 5 stored procedure from Data Services?( ● How to call MySQL 5 view from Data Services? (coming up) ● Data Service in 2 minutes - Movie (coming up) ● Getting started with Data Services using Oracle ( ● Getting started with Data Services using WSO2 WSAS-2.0 ( - using Derby as database ● Getting started with Data Service Samples - Movie ( - using Derby as database ● Mailing list (
  34. 34. Profes s ional S ervices & s upport ● WSO2 is the leading provider of Open Source support for Apache WS projects ● With over 50 employees in three geographies we can offer first class support ● Range of support options up to 24x7 production ● Support Backed by key Apache and OSS committers ● More information -
  35. 35. Q&A
  36. 36. S ummary ● Service enable data locked away in relational databases ● Support for tables,views, functions & stored procedures ● Data Service Description Language ● Not limited to RDBMS (CSV,EXCEL,...) ● Improved QoS using WSAS capabilities ● Professional support
  37. 37. Training s ● Introduction to Data services (Tuesday 29th) from 9.00 am to 12.00 noon (PST) ● Advance Data services (will be advertised in future) ● Visit for more information
  38. 38. Future webinars ● 19th February – Event Streaming Processing with WSO2 ESB & Esper ● Register now for the next one at –