Sunday, October 24, 2010

JSON Data Services

Want to specify an SQL statement and a corresponding URI pattern, and create a RESTful JSON Data Service with just one line of configuration?

The Free and Open Source UltraESB v1.3.0 introduces JSON Data Services which does exactly this! Create data services by specifying a SQL file and a URI pattern. The URI patterns allows you to specify variables, that correspond to the SQL statement as shown in the following example.

For example, say that you would like to expose the result of the SQL query:
SELECT * from employee where permanent = 1
and would like the Data Service to be available at URI:
/getPermanentEmployees

Or to consider a more advanced example, say that you wish to expose the results of the SQL:
SELECT * from employee where
    division = :division and department = :department 
    and sex = :sex and age > :age
and expose the Data Service with a URI as follows:
/byDeptAndDivision/<department>/<division>?age=<age>&sex=<sex>

See how easily you could create RESTful JSON Data Services using the UltraESB and a couple of lines of configuration in "JSON Data Services" published on the AdroitLogic web site.

No comments: