Processing Distributed Data using XSLT, JavaScript, and Java: Advanced Data Services

You can use WorkSpace Data Federation to generate a data service, or you can write your own data service using Java, XSLT, or JavaScript.

Any data service can process data from one or more sources of these types:

You can invoke data services using JDBC or SOAP calls, or as input to other data services and view generators. A data service accepts runtime parameters, which can be routed to the input sources or to the data service plug-in. The output can be in rowset, XML, or raw byte stream format; output may also include parameters.

Data services perform their processing in a data service plug-in. A data service plug-in can be implemented as an XSLT style sheet, as JavaScript, or as Java classes (packaged in a JAR file). When you use WorkSpace Data Federation to generate and deploy data services, the plug-ins are generated as JavaScript. (When you use this method to create a data service, you might never see the plug-in—WorkSpace Data Federation creates and manages it for you.)

Use a different set of tools to write your own data service plug-in using XSLT, Java, or JavaScript. The style sheet, JAR, or .js file you create must be shared into the data catalog. Writing a custom data service plug-in, rather than creating a view model, makes sense when you are working with nonrelational data.

Another reason you might choose to write a custom data service plug-in is to use distributed transactions. When you need a set of database operations that write to multiple databases to be treated as a single transaction—that is, all must succeed, or if any fail, all must be rolled back—you can write a Java plug-in that uses the two-phase commit protocol, then set up a data service that calls all the database operations.

For instructions on writing custom data service plug-ins, see the Data Federation Provisioning and Advanced Data Integration Guide, part of the DI Suite documentation set, which is available on the Sybase Product Manuals Web site at http://sybooks.sybase.com.

In the default access control scheme, data services must be configured by members of the DataProviders group.

Related tasks
Developing a Custom Data Service

For product-related issues, contact Sybase Technical Support at 1-800-8SYBASE. Send your feedback on this help topic directly to Sybase Technical Publications: pubs@sybase.com