If using Tomcat then you can check whether the OGSA-DAI services are available.
If using OGSA-DAI
Axis
and Tomcat then, assuming Tomcat is running,
visit the following page using an internet browser:
http://HOST:PORT/dai/services/
.
For example:
http://localhost:8080/dai/services/
.
Where:
HOST is the host on which Tomcat is
running.
PORT is the port on which Tomcat
accepts connections.
This assumes that the default OGSA-DAI Axis webapp of
dai was used at deployment.
If all has gone well, you should see a list of services including OGSA-DAI services plus information on their operations and links to their WSDL service description documents. There should be entries for each OGSA-DAI service type:
If you are using Tomcat then you can check the OGSA-DAI server state at any time using a JSP page that is deployed with OGSA-DAI.
If using OGSA-DAI
Axis
and Tomcat then, assuming Tomcat is running,
visit the following page using an internet browser:
http://HOST:PORT/dai/dai-manager.jsp.
For example:
http://localhost:8080/dai/dai-manager.jsp.
Where:
HOST is the host on which Tomcat is
running.
PORT is the port on which Tomcat
accepts connections.
This assumes that the default OGSA-DAI Axis webapp of
dai was used at deployment.
If all has gone well you should see information on the OGSA-DAI version, the list of deployed resources, including your data resource, and a list of activities known to the server.
![]() | Note |
|---|---|
| Visiting the JSP page causes all resources specified in the OGSA-DAI server configuration to be loaded. |
As part of OGSA-DAI we provide a set of example clients. These are intended to allow users to quickly test their deployment as well as providing basic examples of how to construct clients using the client toolkit.
![]() | Note |
|---|---|
| The OGSA-DAI example clients are not intended to be the robust end-to-end applications that we would imagine OGSA-DAI end-users using. OGSA-DAI offers a toolkit which provides developers with the tools to develop their own clients that use OGSA-DAI services - these clients are the simplest examples built using this toolkit. |
Arguments common to many of the clients are as follows:
Services base URL - this specifies the location of the OGSA-DAI server.
For OGSA-DAI Axis the services base URL is of form:
http://HOST:PORT/dai/services/
HOST is the host on which the
container is running.
PORT is the port on which the
container accepts connections.
A resource type name. This is the name of an OGSA-DAI resource type. Section I.2, “Default resource type names” provides a full list of OGSA-DAI resource types.
One or more resource IDs. These are just strings possibly with
"." delimiters. The following are some
examples of resource IDs:
DataRequestExecutionResource JDBCResource XMLDBResource FileResource uk.org.ogsadai.MyBrandNewDataResource org.somecompany.com.CustomDataResource
To set the CLASSPATH in an OGSA-DAI
binary distribution:
If running under Solaris or Linux run:
$ source setenv.sh
If running under Windows run:
$ setenv.bat
The FAQ "Section C.1.21, “
What do I need in my CLASSPATH to be
able to run OGSA-DAI clients or compile OGSA-DAI client examples?
”" describes what is needed in
the CLASSPATH to run OGSA-DAI clients
if the above are not used.
This is a simple command-line client for running generic queries as to the state of an OGSA-DAI server.
To print the OGSA-DAI server version run:
$ java uk.org.ogsadai.client.toolkit.example.ServerClient \ -u SERVICES-BASE-URL -c getVersion
To print all the resources of a given type known to the server run:
$ java uk.org.ogsadai.client.toolkit.example.ServerClient \ -u SERVICES-BASE-URL -t RESOURCE-TYPE -c listResources
If no -t RESOURCE-TYPE argument is
given then all resources are listed.
To print the lifetime of an OGSA-DAI resource run:
$ java uk.org.ogsadai.client.toolkit.example.ServerClient \ -u SERVICES-BASE-URL -r RESOURCE-ID -t RESOURCE-TYPE \ -c getLifetime
To print the supported activities of an OGSA-DAI resource run:
$ java uk.org.ogsadai.client.toolkit.example.ServerClient \ -u SERVICES-BASE-URL -r RESOURCE-ID -t RESOURCE-TYPE \ -c getActivities
To print the value of an OGSA-DAI resource property run:
$ java uk.org.ogsadai.client.toolkit.example.ServerClient \ -u SERVICES-BASE-URL -r RESOURCE-ID -t RESOURCE-TYPE \ -c getProperty -p RESOURCE-PROPERTY-NAME
RESOURCE-PROPERTY-NAME should
be the name of a resource property exposed by the resource.
Section I.4, “Default resource property names” lists the default resource
property names for each type of OGSA-DAI resource.
To print out the WS-EPR of a resource exposed by a service run:
$ java uk.org.ogsadai.client.toolkit.example.ServerClient \ -u SERVICES-BASE-URL -r RESOURCE-ID -t RESOURCE-TYPE \ -c resolve
This is a simple command-line client for executing SQL queries on a relational resource and pretty-printing the results. You can specify the ID of the data request execution resource is the OGSA-DAI resource which will execute the request, the ID of the relational data resource at which relational activities in the request (ie. SQLQuery) will be targetted and the SQL query itself.
To run a query on a relational data resource run:
$ java uk.org.ogsadai.client.toolkit.example.SQLClient \ -e DRER-ID \ Optional. Default DataRequestExecutionResource -d DATA-RESOURCE-ID \ Optional. Default JDBCResource -u SERVICES-BASE-URL \ Optional. Default "http://localhost:8080/dai/services/" -q SQL-QUERY
For example:
$ java uk.org.ogsadai.client.toolkit.example.SQLClient \ -u http://localhost:8080/dai/services/ \ -d MyOwnJDBCDataResource \ -q "SELECT * FROM littleblackbook where id < 10"
This is a simple command-line client for listing collections and resources in XMLDB data resources and running XPath queries and displaying the results. You can specify the ID of the data request execution resource is the OGSA-DAI resource which will execute the request, the ID of the XMLDB data resource at which XMLDB activities in the request (eg. XMLListCollections, XMLListResources, XPath) will be targetted, the XML activity to be executed and any parameters this requires.
To list the collections in an XMLDB data resource run:
$ java uk.org.ogsadai.client.toolkit.example.XMLDBClient \ -e DRER-ID \ Optional. Default DataRequestExecutionResource -d DATA-RESOURCE-ID \ Optional. Default XMLDBResource -u SERVICES-BASE-URL \ Optional. Default "http://localhost:8080/dai/services/"; -c listCollections \ -coll COLLECTION Optional. Sub-collection to list.
If -coll COLLECTION is ommited then
the collections in the base collection of the XMLDB data resource are
listed.
For example:
$ java uk.org.ogsadai.client.toolkit.example.XMLDBClient \ -u http://localhost:8080/dai/services/" \ -d MyOwnXMLDDataResource \ -c listCollections \ -coll someSubCollection
To list the resources in an XMLDB data resource run:
$ java uk.org.ogsadai.client.toolkit.example.XMLDBClient \ -e DRER-ID \ Optional. Default DataRequestExecutionResource -d DATA-RESOURCE-ID \ Optional. Default XMLDBResource -u SERVICES-BASE-URL \ Optional. Default "http://localhost:8080/dai/services/"; -c listResources \ -coll COLLECTION Optional. Sub-collection to list resources of.
If -coll COLLECTION is ommited then
the resources in the base collection of the XMLDB data resource are listed.
For example:
$ java uk.org.ogsadai.client.toolkit.example.XMLDBClient \ -u http://localhost:8080/dai/services/" \ -d MyOwnXMLDDataResource \ -c listResources \ -coll someSubCollection
To run an XPath query over the resources in an XMLDB data resource run:
$ java uk.org.ogsadai.client.toolkit.example.XMLDBClient \
-e DRER-ID \ Optional. Default DataRequestExecutionResource
-d DATA-RESOURCE-ID \ Optional. Default XMLDBResource
-u SERVICES-BASE-URL \ Optional. Default "http://localhost:8080/dai/services/";
-c xpath \
-coll COLLECTION \ Optional. Sub-collection to run query in.
-r RESOURCE \ Optional. Name of resource in collection to run
query over.
-n PREFIX:URN, PREFIX:URN,... \ Optional. Mappings from namespace
prefixes used in the XPath
query to namespace URNs.
-x XPATH-QUERY Required. XPath query to run.
If -coll COLLECTION is ommited then
the resources in the base collection of the XMLDB data resource, and
its sub-collections, are queried.
If -r RESOURCE is provided then
only the named resource in the sub-collection or base collection (if
there is no -coll value given) is
queried if there is a resource with that name.
For example:
$ java uk.org.ogsadai.client.toolkit.example.XMLDBClient \ -u http://localhost:8080/dai/services/ \ -d MyOwnXMLDDataResource \ -c xpath -x "//*"
$ java uk.org.ogsadai.client.toolkit.example.XMLDBClient \ -u http://localhost:8080/dai/services/ \ -d MyOwnXMLDDataResource \ -c xpath \ -coll someSubCollection -resource someXMLDBResource \ -n myprefix:http://org.somecompany.com/XML,myprefix2:http://org.someothercompany.com/SomeOtherXML \ -x "//*/myprefix:SomeElement/myprefix2:SomeOtherElement/"
This is a simple command-line client for listing file system resources and reading files in these and pretty-printing the results. You can specify the ID of the data request execution resource is the OGSA-DAI resource which will execute the request, the ID of the file system data resource at which file activities in the request (eg. ListDirectory or ReadFile) will be targetted, the file activity to be executed and any parameters this requires.
To list the files in a directory of a file system resource run:
$ java uk.org.ogsadai.client.toolkit.example.FileClient \ -e DRER-ID \ Optional. Default DataRequestExecutionResource -d DATA-RESOURCE-ID \ Optional. Default FileResource -u SERVICES-BASE-URL \ Optional. Default "http://localhost:8080/dai/services/"; -c list \ -dir DIR Optional. Sub-directory to list.
If -d DIR is ommited then the root of
the file system resource is listed.
For example: $ java uk.org.ogsadai.client.toolkit.example.FileClient \ -u http://localhost:8080/dai/services/ \ -d MyOwnFileDataResource \ -c list -d somedir
To read a files in a file system resource run:
$ java uk.org.ogsadai.client.toolkit.example.FileClient \ -e DRER-ID \ Optional. Default DataRequestExecutionResource -d DATA-RESOURCE-ID \ Optional. Default FileResource -u SERVICES-BASE-URL \ Optional. Default "http://localhost:8080/dai/services/"; -c read \ -f FILE
The FILE argument can specify a
directory path relative to the root of the file system resource e.g.
some/dir/someFile.txt.
For example:
$ java uk.org.ogsadai.client.toolkit.example.FileClient \ -u http://localhost:8080/dai/services/ \ -d MyOwnFileDataResource \ -c read -f some/dir/someFile.txt