3.3. Using the Command-line Client

Before running the client, set your classpath using the etc/classpath.bat|(c)sh script depending on the OS/shell you use - e.g. if you use tcsh on Unix, set your classpath by typing the following command:

    source etc/classpath.sh

To launch a job using the Date service mentioned in Application Deployment, you could use the following command, which displays the resulting job id, along with the preliminary status.

    java edu.sdsc.nbcr.opal.GenericServiceClient \
                 -l http://localhost:8080/opal2/services/DateService \
                 -r launchJob \
                 -a \""-v1d -v3m -v0y -v-1d -u"\"

If your arguments contain characters like "-", you will have to put your whole set of arguments within quotes that are escaped (\"..\"). If your arguments don't have special characters like the above, you can simply use regular quotes ("..").

You can retrieve job status by running the following command:

    java edu.sdsc.nbcr.opal.GenericServiceClient \
                 -l http://localhost:8080/opal2/services/DateService \
                 -r queryStatus \
                 -j <job_id>

Once the job has finished executing, you can also retrieve output metadata using:

    java edu.sdsc.nbcr.opal.GenericServiceClient \
                 -l http://localhost:8080/opal2/services/DateService \
                 -r getOutputs \
                 -j <job_id>

You may need to change the above URL if you used a different port, or are running the client from another machine. Note that you can get the complete usage information for the client by using the following command:

    java edu.sdsc.nbcr.opal.GenericServiceClient