OGSA-DAI provides a simple command-line client for running requests involving relational data resources. This uses the SQLQuery, TupleToWebRowSetCharArrays, CharArraysResize and DeliverToRequestStatus activities. The query results are pretty-printed.
The secure relational client is an extension of the example SQL client (Chapter 71, Example relational data resource client) which allows various Globus Toolkit security settings to be used to secure communications between the client and the server. It is a useful program to check that server security is configured correctly. You use either transport level security or message level security with secure conversation. Both security options provide message integrity by default but can be specified to additionally provide message privacy using encryption. Both security options use host authorization to authorize the server.
![]() | Note |
|---|---|
| OGSA-DAI example clients are intended to allow users to quickly test their deployment as well to provide basic examples of how to construct clients using the client toolkit. They are not intended to be robust applications for use in production environments. OGSA-DAI offers a toolkit which provides users with the tools to develop their own clients that use OGSA-DAI services - these clients are the simplest examples built using this toolkit. |
The client takes the following arguments:
-u SERVICES_BASE_URL -
services base URL - this specifies the location of the OGSA-DAI
server. This will typically be of form:
http://HOST:PORT/wsrf/services/dai/where
HOST is the host on which the
OGSA-DAI is running and PORT is the
port on which the container accepts connections.
![]() | Note |
|---|---|
Because host authorization is used the client must specify
the full name of the server and cannot use
localhost.
|
-e DRER-ID -
a data request execution resource (DRER) ID. This is the ID
of the DRER that will execute the request. Usually this
can be omitted (the default in this case is
DataRequestExecutionResource).
-d DATA-RESOURCE-ID -
a data resource ID. The ID of the data resource that
the client will interact with.
-q QUERY -
the SQL query to run.
![]() | Caution |
|---|---|
The client should be run in the
$OGSADAI_HOME directory or
you should make sure that the directory
$OGSADAI_HOME/deploy is
in your CLASSPATH (the
client-config.wsdd file
in that directory is necessary).
|
Run the following,
replacing SERVICES-BASE-URL,
DATA-RESOURCE-ID,
QUERY and, if required
DRER-ID.
$ java uk.org.ogsadai.client.toolkit.gt.example.GTSecureSQLClient \ -u SERVICES-BASE-URL [-e DRER-ID] -d DATA-RESOURCE-ID \ -q QUERY -secconv [encrypt]
The default of message integrity is enforced. If the
encrypt flag is provided then message
privacy is enforced.
For example:
$ java uk.org.ogsadai.client.toolkit.gt.example.GTSecureSQLClient \ -u http://coal.epcc.ed.ac.uk:8080/wsrf/services/dai/ -d MyOwnSQLDataResource \ -q "SELECT * FROM littleblackbook WHERE id < 10;" \ -secconv $ java uk.org.ogsadai.client.toolkit.gt.example.GTSecureSQLClient \ -u http://coal.epcc.ed.ac.uk:8080/wsrf/services/dai/ -d MyOwnSQLDataResource \ -q "SELECT * FROM littleblackbook WHERE id < 10;" \ -secconv encrypt
Run the following,
replacing SERVICES-BASE-URL,
DATA-RESOURCE-ID and, if required
DRER-ID.
QUERY should be replaced by
your query.
$ java uk.org.ogsadai.client.toolkit.gt.example.GTSecureSQLClient \ -u SERVICES-BASE-URL [-e DRER-ID] -d DATA-RESOURCE-ID \ -q QUERY -tls [encrypt]
As transport level security is being used you should use
https (and not
http) in your URL.
The default of message integrity is enforced. If the
encrypt flag is provided then message
privacy is enforced.
For example:
$ java uk.org.ogsadai.client.toolkit.gt.example.GTSecureSQLClient \ -u https://coal.epcc.ed.ac.uk:8443/wsrf/services/dai/ -d MyOwnSQLDataResource \ -q "SELECT * FROM littleblackbook WHERE id < 10;" \ -tls $ java uk.org.ogsadai.client.toolkit.gt.example.GTSecureSQLClient \ -u https://coal.epcc.ed.ac.uk:8443/wsrf/services/dai/ -d MyOwnSQLDataResource \ -q "SELECT * FROM littleblackbook WHERE id < 10;" \ -tls encrypt