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

You can use a data service to process data from files, external web services, other data services, database operations, or virtual database operations. You can use WorkSpace Data Federation to generate and deploy data services, or you can write your own data service using XSLT or Java.

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


Data services can be invoked via JDBC or SOAP calls, or they can be invoked 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. (Note that when you use this method to create a data service, you might never see the plug-in—WorkSpace Data Federation creates it for you.)

If you want to write your own data service plug-in using XSLT or Java, you’ll use a different set of tools. The style sheet or JAR file you create must be shared into the data catalog. Writing your own data service plug-in makes sense when you're 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 several database operations to be treated as a single transaction—that is, all must succeed, or if any fails, 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 creating 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.

Send your feedback on this help topic to Sybase Technical Publications: pubs@sybase.com

Your comments will be sent to the technical publications staff at Sybase, Inc. For product-related issues or technical support, contact Sybase Technical Support at 1-800-8SYBASE.