GDSF Configuration

This practical shows how to configure OGSA-DAI to work with a Xindice database on localhost and a MySQL database on a remote host. When the configuration is complete, it is tested by running a command client. The client contacts the registry, retrieves a GDSF handle, connects to the GDSF and requests a GDS to be created. After creating the GDS, it performs a simple query on the database.

1. Configuration of Xindice database

  1. Start Xindice
      #> cd xml-xindice-1.0
      #> ./start
  2. Now run the database creator to create example data:

GDSF configuration for Xindice database

This section describes the configuration of the GDSF for a MySQL database on localhost.
  1. Setup the DataResource Configuration file:
  2. Setup the rolemap file:
  3. Setup the parameters in the server-config.wsdd:
  4. Start Xindice if it is not running:
      #> cd xindice
      #> ./start 
  5. Start the container
      #> cd tomcat/bin
      #> ./startup.sh
  6. Run the end-to-end client as a test.
      #> cd ogsadai
      #> ./setenv.sh
      #> java uk.org.ogsadai.client.Client -test http://localhost:8080/ogsa/services/ogsadai/DAIServiceGroupRegistry examples/GDSPerform/XMLDB/xpath/queryCollection1.xml
    
    You should the see output as shown below.

GDSF configuration for MySQL database

This section describes the configuration of the GDSF for a MySQL database on an external host.
  1. Setup the DataResource Configuration file:

Output:
Perform results:
<gridDataServiceResponse xmlns="http://ogsadai.org.uk/namespaces/2003/07/gds/types"><result name="myActivityOutput" status="COMPLETE"><![CDATA[<resourceSet>
  <resource>

<entry id="1" xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/littleblackbook" src:key="1">
  <name>Ally Antonioletti</name>
  <address>826 Hume Crescent, Southampton</address>
  <phone>01670061244</phone>
</entry>
  </resource>
  <resource>

<entry id="10" xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/littleblackbook" src:key="10">
  <name>Martin Laws</name>
  <address>224 Palansuriya Lane, Winchester</address>
  <phone>06686142062</phone>
</entry>
  </resource>

....

<entry id="98" xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/littleblackbook" src:key="98">
  <name>Norman Jackson</name>
  <address>033 Borley Avenue, San Jose</address>
  <phone>03480099767</phone>
</entry>
  </resource>
  <resource>

<entry id="99" xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/littleblackbook" src:key="99">
  <name>Paul Krause</name>
  <address>100 Watson Crescent, Winchester</address>
  <phone>01908557297</phone>
</entry>
  </resource>
</resourceSet>
]]></result><result name="myActivity" status="COMPLETE"/></gridDataServiceResponse>