OGSA-DAI provides a simple command-line client for running generic operations to query the state of an OGSA-DAI 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. |
![]() | Important |
|---|---|
The OGSA-DAI command-line clients do not work for the Jersey technology preview
without recompiling. The ServerProxy class
only applies to the Axis/GT4 releases of OGSA-DAI and must be replaced by
the Jersey specific JerseyServer class.
Replace the following line in the source code of the client: ServerProxy server = new ServerProxy(); with this code: import uk.org.ogsadai.client.toolkit.presentation.jersey.JerseyServer; ... Server server = new JerseyServer();
Then replace any occurrences of |
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:
where HOST is the host on which the
OGSA-DAI is running and PORT is the
port on which the container accepts connections.
-t RESOURCE-TYPE -
a resource type name. This is the name of an OGSA-DAI resource
type and must be one of:
uk.org.ogsadai.DATA_REQUEST_EXECUTION_RESOURCE uk.org.ogsadai.DATA_RESOURCE uk.org.ogsadai.DATA_SOURCE_RESOURCE uk.org.ogsadai.DATA_SINK_RESOURCE uk.org.ogsadai.DATA_SINK_RESOURCE uk.org.ogsadai.SESSION_RESOURCE uk.org.ogsadai.REQUEST_RESOURCE
Run the following, replacing
SERVICES-BASE-URL:
$ java uk.org.ogsadai.client.toolkit.example.ServerClient \ -u SERVICES-BASE-URL -c getVersion
For example:
To print all the resources of a given type known to the server run the
following, SERVICES-BASE-URL and
RESOURCE-TYPE:
$ java uk.org.ogsadai.client.toolkit.example.ServerClient \ -u SERVICES-BASE-URL [-t RESOURCE-TYPE] -c listResources
If no -t argument is given then all
resources are listed.
For example:
Run the
following, replacing SERVICES-BASE-URL,
RESOURCE-ID and
RESOURCE-TYPE:
$ java uk.org.ogsadai.client.toolkit.example.ServerClient \ -u SERVICES-BASE-URL -r RESOURCE-ID -t RESOURCE-TYPE \ -c getLifetime
For example:
Run the following,
replacing SERVICES-BASE-URL,
RESOURCE-ID and
RESOURCE-TYPE:
$ java uk.org.ogsadai.client.toolkit.example.ServerClient \ -u SERVICES-BASE-URL -r RESOURCE-ID -t RESOURCE-TYPE \ -c getActivities
For example:
Run the
following, replacing SERVICES-BASE-URL,
RESOURCE-ID,
RESOURCE-TYPE and
RESOURCE-PROPERTY-NAME which should
be the name of a resource property exposed by the resource.
Section K.2, “Default resource property names” lists the default resource
property names for each type of OGSA-DAI resource.
$ java uk.org.ogsadai.client.toolkit.example.ServerClient \ -u SERVICES-BASE-URL -r RESOURCE-ID -t RESOURCE-TYPE \ -c getProperty -p RESOURCE-PROPERTY-NAME
For example:
To print out the WS-EPR of a resource exposed by a service run the
following, replacing SERVICES-BASE-URL,
RESOURCE-ID and
RESOURCE-TYPE:
$ java uk.org.ogsadai.client.toolkit.example.ServerClient \ -u SERVICES-BASE-URL -r RESOURCE-ID -t RESOURCE-TYPE \ -c resolve
For example: