The Client Toolkit Tutorial


These pages introduce the OGSA-DAI Client Toolkit, a Java API providing the basic building blocks for OGSA-DAI client development. Using these building blocks, 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 shields the developer from future changes.

The OGSA-DAI Client Toolkit supports interaction with OGSA-DAI services compliant with OGSI, WSRF and WSI.

The main concept of the Client Toolkit is that of the activity. An activity dictates an action to be performed by an OGSA-DAI service. OGSA-DAI provides many different types of activity to perform operations such as SQL queries, XSL transformations and FTP data delivery. A sequence of one or more activities can be chained together to form a request. The Client Toolkit provides a simple mechanism for constructing and processing requests. The steps involved in a typical interaction are summarised below:

  1. Locate an OGSA-DAI data service
  2. Construct a number of activities
  3. Chain them together to form a request
  4. Process the request using the data service
  5. Process 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. At the bottom of this page is a list of prerequisites that should be satisfied before following the examples.


  1. The example solutions can be found here
  2. $ export GLOBUS_LOCATION=$HOME/ogsa-dai/ws-core-4.0.0
    $ export OGSADAI_LOCATION=$HOME/ogsa-dai/ogsadai-wsrf-1.0
    $ cd ~/ogsa-dai
    $ mkdir -p tutorial/examples/tutorials/clienttoolkit
    There is a build file provided with these exercises. Place it in ~/ogsa-dai/tutorial/:
    $ cd tutorial
    $ wget
    Copy client-config.wsdd:
    cp ../../ws-core-4.0.0/client-config.wsdd .
    Place your own source code in ~/ogsa-dai/tutorial/examples/tutorials/clienttoolkit. You can compile your source code or the example source code by running the command
    $ ant compile
    and then run them with the command
    $ ant run -Dclass=YourClientClass
    where you replace "YourClientClass" with the appropriate name. (The ant script will automatically compile the sources if necessary.)
  3. A MySQL database can be accessed via a data service located at and resource IDs MySQLResource[1-35].
  4. The Xindice database can be accessed via a data service located at and resource IDs XindiceResource[1-35].
  5. Make sure that you use the correct service URL in your classes. By default, most of the examples try to connect to a data service at localhost:8080 which won't work for our setup.


The following pages contain the following: