The Client Toolkit Tutorial

Introduction

These pages introduce the OGSA-DAI Client Toolkit, a Java API that provides the basic building blocks for OGSA-DAI client development. Using these APIs, a developer can construct anything from a basic query client to a complex distributed data integration client with relative ease. The Client Toolkit minimises the specialist knowledge required to interact with OGSA-DAI services and provides some protection from future changes to the data service interfaces. It also operates transparently with OGSA-DAI data services compliant with both WS-I and WSRF.

The main concept of the Client Toolkit is that of an activity. An activity dictates an action that is to be performed by a data service resource. OGSA-DAI provides many different types of activity to perform operations such as SQL queries, XSL transformations and FTP data delivery. The Client Toolkit provides a simple mechanism for assembling requests describing multiple activities, then submitting the request to data service resources for processing. The steps involved in a typical interaction are summarised below:

  1. Locate a data service resource
  2. Construct a number of activities
  3. Chain them together and assemble an activity request
  4. Send the activity request to the data service resource for processing
  5. Interpret the results of the activities

The remainder of these pages consists of practical examples with sample code. Starting with a basic query, the examples become progressively more complex, ending up with a distributed query data integration scenario. Examples for using security on OGSA-DAI WSRF are contained in the section WSRF (GT4) examples at the bottom of this page. A list of prerequisites that should be satisfied before following the examples is below.

Prerequisites

  1. We assume that OGSA-DAI services are running on http://localhost:8080/.
  2. MySQL and eXist test databases have been set up with the OGSA-DAI example data - how to set up these databases is described on these pages.
  3. The MySQL database can be accessed via:
  4. The eXist database can be accessed via:

How to Compile and Run the Examples

We provide an ANT file build-examples.xml which allows you to build and run the examples:

For Advanced Users - the CLASSPATH

If you are an advanced user and like using the CLASSPATH then you need to ensure you have the following in your CLASSPATH:

Examples

The following pages contain:

See the full list of Client Toolkit Examples.

WSRF (GT4) Platform-Specific Examples

These are examples that are only applicable for the WSRF (GT4) version of OGSA-DAI.