Data Sources as Web Services
WSO2 (WS OH 2) is growing in popularity and the team continues to produce quality products. The WSO2 (a.k.a. Web Services Oxygen Tank) team that has pulled together a platform around Apache SOA projects, producing an application server, ESB, Web 2.0 mashup engine, and more. Most recently, they have released Version 2.1 of the Web Services Application Server (WSAS). The release includes a lot of compelling features, but this article focuses upon WSO2 Data Services.
This article introduces WSO2 Data Services, a new feature available in WSO2's WSAS 2.0 platform (the latest release is version 2.1). I will begin by introducing Data Services, examining their architecture and utilization, and then exploring pros and cons of this convenient feature.
Introducing Data Services
Once you move past novelty web services that echo a string you sent or perform some sort of trivial mathematical computation (e.g., MySquareRootService or CalculatorService), services are either facilitating the insertion or retrieval of data. Whether you want to retrieve customer and product data via a service request or you want to be able to expose supply chain operations to key business partners, folding your data access layer into your SOA architecture is key. WSO2 Data Services provide a convenient and well-engineered mechanism for service orienting your data.
In Figure 1, a conceptual WSO2 enterprise deployment is illustrated. Data services are standard web services that have been configured within WSAS to map to data source calls to one or more backend data sources. Configuration is captured in XML and can either be performed by hand and uploaded as a complete deployment module, or deployed via the web-based Data Service configuration wizard. Once deployed, these services can either be consumed by other WSAS services or be made available to external* clients.

Figure 1
*Exposing select services outside the firewall (as depicted in Figure 1) is not a feature that is explicitly supported by WSAS. It is, however, representative of industry best practices for SOA and is supported by a variety of implementation solutions (proxy server, selective firewall configuration, SOA networking appliance, etc.).
With the recent production release of WSAS 2.1, the following data sources are supported:
- Relational databases (including support for calling stored procedures)
- CSV data sources (both local and remote files via HTTP)
- Excel data sources (both local and remote files via HTTP)
- JNDI data sources
When configuring a WSO2 data service, you'll need data source connection info (varies depending upon the source type). Then you specify the queries, input/output mappings (map XML element names to column names), and finally map each query to a service operation. Once deployed, these services can then be configured like any other service with various security requirements, policies, and AXIS runtime processing handlers.
Data Services Architecture and Utilization
Data Services are essentially the SOA-equivalent of the Data Access Object pattern. Granted, Data Services are at a much higher level of abstraction, but they serve a similar role in a layered architecture. They enable higher level services or even client applications to access underlying datasets without regard for the implementation details involved. Consider the SOA reference architecture depicted in Figure 2. Data services function in a similar fashion to standard Web services. The key difference is that they provide more direct access to underlying data (albeit with operation-to-query mapping and element-to-column mapping) rather than accessing data indirectly via applications and business objects (EJBs, POJOs, etc.).

Figure 2
To explore WSO2 Data Services for yourself, a number of resources are available, including:
- Getting Started with WSO2 Data Services (simple tutorial)
- How to call MySQL 5 stored procedures from Data Services (more advanced tutorial)
- Hosting WSO2 Data Services on WSAS (administrator's guide documentation)
- Getting Started with Data Service Samples (20 MB tutorial-style movie)
If you should decide to make WSO2 Data Services an option for SOA solutions, governance will be important. The simplicity of Data Services can potentially lead to ill-conceived utilization of this convenient capability. It's funny, but it almost makes it too easy to expose data as services. Consequently, developers may be tempted to generate one or more services based off of existing data sources as a quick fix, rather than designing the solution appropriately and developing the architectural layers that are really needed to ensure a robust and reusable solution. In a similar vein, creation of Data Services may promote more of a bottom-up approach to service orientation. This is not an inherently bad thing, but often a top-down strategy will yield a better alignment with long-term business goals. If it is too easy to expose existing data sets as services, developers are not forced to critically analyze the requirements and evaluate whether or not the current data sets really address the problem at hand. All of this points to a need for stronger governance regarding how and under what circumstances this particular capability can be acceptable leveraged.
Advantages of WSO2 Data Services
WSO2 Data Services offer some significant benefits to enterprises that are interested in service orientation, including the following:
- Convenient service orientation of existing data sources such as RDBMS, CVS, Excel, and JNDI data sources
- Ability to service orient RDBMS stored procedures
- Configurable Data Service Layer including service operation mapping and element name mapping
- Apply role-based security to data access, including digital signatures, encryption, and various security tokens
- Apply WS-policy assertions to data access services
- Selectively expose underlying datasets through queries and XML mapping
- Great for proof-of-concept SOA projects to quickly expose data via simple Web services
WSO2 Data Services clearly have a lot going for them. They provide a convenient way to quickly service orient data, but still allow for enterprise-grade configuration and architectural decisions to be made.
Disadvantages of WSO2 Data Services
WSO2 Data Services also have some drawbacks that need to be considered, including the following:
- Exposing data tables as services is easy, but does not really promote the architecture aspect of SOA
- Creation of data services may promote a bottom-up service orientation approach, when a top-down strategy might yield better results
- Data service queries cannot span multiple data sources (each service is tied to one data source)
The great irony of WSO2 Data Services is that their very strength (quick, convenient exposure of enterprise data) is also their biggest weakness. In some respects, it is too easy to expose these services. Moreover, although it is possible to incorporate this into a well-planned architecture, the simplicity may lead some to just deploy these services and consider it good enough without really thinking through the architectural implications. The take away here is to ensure that strong governance is in play to guide the utilization of the powerful and simple and feature.
Service-Oriented Data Access
The heart of any enterprise application is data. Applications provide the ability to view, sort, filter, edit, create, and delete data. In a SOA, access to data is also paramount. Typically this involves wrapping an existing business object (EJB or POJO) with a web service. Another option is to bypass this additional layer and directly expose data capabilities via WSO2 Data Services. Data services are convenient, configurable, and great for service oriented data for a demo or even as a part of a SOA. When you get the chance, swing by WSO2 and take WSAS 2.X and Data Services for a spin.
Share your experience in our forums.
(* You must be a member of XML.com to use this feature.)
Comment on this Article
| Titles Only | Titles Only | Newest First |
- Carpet Cleaners Rugs Cleaning Upholstery Cleaning West Los Angeles 1-310-925-1720
2009-06-11 15:04:10 whats [Reply]
Carpet Rugs Upholstery Cleaning West Los Angeles 1-310-925-1720
L.A Carpet Care call 1-323-678-2704 Steam or dry Cleaner - Carpet Steam or dry cleaning, Deep Shampoo Carpet Cleaning, Area Rugs cleaning, Mattress Cleaning, Upholstery furniture Cleaning, curtain cleaning, Green Organic Carpets Cleaning.
Los Angeles Carpet Cleaning Company Non-toxic Cleaning, Safeclean organic cleaning Los Angeles, California. Carpet cleaning Los Angeles,CA: We provide rug cleaning, upholstery cleaning, wood floor refinishing & maintenance, flood & water damage restoration, air duct cleaning and much more. LA Carpet Cleaning The Main Los Angeles Local Carpet Cleaners
- WSO2 Data Services 1.0
2008-09-26 19:37:24 sumedha rubasinghe [Reply]
We have moved Data Services capabilities into a single product (WSO2 Data Services). The latest release can be obtained from here (http://wso2.org/projects/solutions/data-services/java) .
- online marketing advertising and directory submit. Website Marketing Services
2008-07-13 12:14:39 0 [Reply]
http://world-marketings.com/default.aspx
Full-Service SEM Solution
Our Full-Service SEM solution offers the support and guidance of an Account Development team and delivers unprecedented performance for advertisers with large-scale, complex search marketing campaigns. This solution is best suited for advertisers who:
Have hit the performance ceiling with their current solution
Seek new solutions to enable automation, scalability and growth
Use a rules-based tool that is no longer effective in opaque search marketplaces
Simply complete the form to learn how you can harness the complexity of search marketing, surpass the competition, and achieve the highest possible return on investment with World Marketing.
World Marketing site provides the ultimate online marketing school guide for marketing, advertising and directory submit. By using it, users can quickly find certified Online Marketing and Advertising, Submit Url to Google, Msn, Yahoo and many other Directories, Text Links, Manual links, Press Release services, Pay Per Click Management, Article Writing by World Marketing, We offer Search Engine Optimization, Web Design Tools and directory services and more than 1,000 other categories in the directory already, users can easily locate services nationally, statewide, and by area.
pioneering the way Internet online marketing work and the way World Marketing interact with customers. Users also have the option of receiving direct request for free quotes and reports from customers.
Some of the features that this web sites offers to users include:
- A simple navigation system that guides you to the content you seek
- High search engine ranking for guaranteed traffic and relevancy.
- Links to other special World Marketing offers.
- National, State, and Area specific content.
- Administrative tools for companies for easy maintenance.
- Directories Submit
- Google Yahoo Msn SEO
- Text Links
- Links Exchange
- Press Release
- Article Writing
- Pay Per Click Management
- Web Design and Tools
- Businesses Promotions PR Blast Traffic get new visitors online.
- Entrepreneurs Make money online start online business tools.
With an exclusive focus on online website marketing related services, this website lead the way in search engines marketing guide , by matching customers with companies that best fit their needs.
call 818-501-3646
- online marketing advertising and directory submit. Website Marketing Services
2008-09-26 19:39:10 sumedha rubasinghe [Reply]
This comment does not related to the article at all !!!. Please remove this.
- online marketing advertising and directory submit. Website Marketing Services
- WSO2 Data Services bags Gold Award!
2008-04-08 07:58:06 afkham@gmail.com [Reply]
WSO2 Data Services won the Gold Award in the Data Services/Integration category in the SearchSOA.com Product of the year competition.
For more details see:
http://searchsoa.techtarget.com/productsOfTheYearWinner/0,296407,sid26_gci1307912_tax310454_ayr2007,00.html
- New Data Services Release - 2.2
2008-01-24 22:33:56 afkham@gmail.com [Reply]
The latest version 2.2 of WSO2 Data Services was released along with WSAS 2.2. This release includes an improved data service UI as well as database connection pooling.
For more details see;
http://wso2.org/project/wsas/java/2.2/docs/rdbms_data_service_guide.html
Download:
http://wso2.org/projects/wsas/java
2008-01-24 22:33:37 afkham@gmail.com [Reply]
The latest version 2.2 of WSO2 Data Services was released along with WSAS 2.2. This release includes an improved data service UI as well as database connection pooling.
For more details see;
http://wso2.org/project/wsas/java/2.2/docs/rdbms_data_service_guide.html
Download:
http://wso2.org/projects/wsas/java
- Great to have WSO2 joining in on data services
2007-12-05 06:53:50 billxa [Reply]
The XAware project (xaware.org) has been promoting the concept of data services, and building software to easily create and manage bi-directional, multi-source, multi-format, multi-consumer data services for several years. It is great to see others recognizing the value of the approach and other projects popping up. Welcome WSO2!
Bill Miller
XAware
- Pros and cons of data sources webservices
2007-11-08 04:12:54 ggiunta [Reply]
In my very limited experience, exposing data sources as webservices with a very minimal amount of coding is the holy grail of SOA, even though about every single sw architect I ever met is against this principle.
It is based on the 80/20 rule: after designing your service, 80% of the changes will be to the data model and will have to be reflected directly into the service interface (double work!). 20% of the changes will be to to the data model and not require an interface change (work saved).
As an down-to-earth example, we always add new fields to existing queries, but very seldom change the database while keeping the same webservice interface (usually when you change db the app gets a major version upgrade too, with new/extended capabilities thrown in).
That's wht I built my own SOA architecture around the design of directly exposing data sources (eg query and recordset objects), while making the webservice layer completely transparent to the coder.
To just shield client away from direct table access, implement all db access via stored procedures, and you got the holy grail.
