End-to-end Client

OGSA-DAI comes with a client that allows you to:

  1. Contact a data service and get a list of the data service resources it exposes.
  2. Submit a perform document to the data service and print the resulting response document.

To submit a perform document to a data service resource exposed by a data service and so perform some data resource-related activites (e.g. query a database):

  1. Ensure that your Web services container is running.
  2. Run the following command from within the OGSA-DAI WSRF binary distribution directory:
    $ ant dataServiceClient -Ddai.url=SERVICE-URL
                            -Ddai.resource.id=RESOURCE-ID
                            -Ddai.action=PERFORM-DOC-LOCATION
    
    For example:
    $ ant dataServiceClient 
     -Ddai.url=http://localhost:8080/wsrf/services/ogsadai/MyDataService
     -Ddai.resource.id=MySQLResource
     -Ddai.action=examples/Perform/JDBC/query/select1Row.xml 
    
  3. The perform document will be forwarded to the data service and executed by the specified data service resource. For example:
    [echo] Executing Perform document on resource One...
    [java] Contacting ... http://localhost:8080/wsrf/services/ogsadai/MyDataService
    [java] Service version: OGSA-DAI WSRF 2.2
    [java] Number of resources: 2
    [java] Resource: MySQLResource
    [java] Resource: AnotherResource
    [java] Data Service Resource: MySQLResource
    [java] About to invoke Perform...
    [java] Perform completed!
    [java] Response: 
    [java] 
    [java] 
    [java] 
    ...
    

The EndToEndClient also supports message-level and transport-level security options, see Using Security with OGSA-DAI Clients for more details.