How to Use the Command Line Version of the Service
Overview
You can download and run the webservice on your own machine. This allows you greater flexibilty
than the webform and the option to call the webservice from other programs. There are two kinds
of command line clients: a stand alone client and a dependent client. This page assumes that
you are simply a user of the webservice, which has already been set up. If you intend to set
up webservice and the middleman yourself, please refer to this page.
The Stand Alone Client
This version of the client is called with a main and command line arguments from the command
prompt. The current version incorporates a queue where the requests are stored until they are
ready to be processed. It can be built as follows:
Requirements:
- Apache Ant 1.7.0
- Axis2 1.4.1, unzipped
- Java version 1.6.0_07
- LinBoxWebservice directory (get this from svn from XXXXXXXXXXXX)
Setup:
- Install Ant, Axis2, and Java
- Set AXIS2_HOME to Axis 2 directory (eg /home/fendt/axis2-1.4.1)
- Set ANT_HOME to Ant directory (eg /home/fendt/apache-ant-1.7.0)
- Set JAVA_HOME to Java directory (eg /usr/lib/jvm/java-6-sun)
- Copy the LinBoxWebservice directory, located at /home/fendt/LinBoxWebservice.
To Install and Run the Stand Alone User Client:
- In the LinBoxWebservice directory, type "ant generate.user.client"
- The client can now be run in the LinBoxWebservice directory, for example: "ant
run.user.client -Darg1=rank -Darg2=matrices/mat2.txt"
Functionality:
- Rank
- Run with ant run.user.client -Darg1=rank -Darg2=(matrix-file)
- Determinant
- Run with ant run.user.client -Darg1=determinant -Darg2=(matrix-file)
- Trace
- Run with ant run.user.client -Darg1=trace -Darg2=(matrix-file)
- Valence
- Run with ant run.user.client -Darg1=valence -Darg2=(matrix-file)
- SmithNormalForm
- (Currently broken) Run with ant run.user.client -Darg1=smithNormalForm -Darg2=(matrix-file)
- QueueStatus, which checks how many operations are currently waiting in the queue
- Run with ant run.user.client -Darg1=queuestatus
- CheckID, which checks the number of operations that are in front of your operation
in the queue.
- Run with ant run.user.client -Darg1=checkID -Darg2=(your-operation-ID)
- GetTimeEstimate, which returns an estimate of how long your operation will take to compute,
and how long until it will be returned to you.
- Run with ant run.user.client -Darg1=gettimeestimate -Darg2=(your-operation-ID)
- EstimateLength, which does a quick calculation on how long your operation will take.
This does not call a web service, but executes a small program on the user's side.
- Run with ant run.user.client -Darg1=estimatelength -Darg2=(matrix-file) -Darg3=(operation)
The Dependent Client
The dependent client is meant to be called from other programs. The webform client is an example
of a dependent client. It does not have a main, but the
code that is generated that can be called by other programs. It is not using queued requests
like the stand alone client, because it is older and hasn't been updated yet. It therefore
does not have any of the queue-specific functionality of the stand alone client. It can be
built as follows:
Requirements:
- Apache Ant 1.7.0
- Axis2 1.4.1, unzipped
- Java version 1.6.0_07
- LinBoxWebservice directory (get this from svn from XXXXXXXXXXXX)
Setup:
- Install Ant, Axis2, and Java
- Set AXIS2_HOME to Axis 2 directory (eg /home/fendt/axis2-1.4.1)
- Set ANT_HOME to Ant directory (eg /home/fendt/apache-ant-1.7.0)
- Set JAVA_HOME to Java directory (eg /usr/lib/jvm/java-6-sun)
- Copy the LinBoxWebservice directory, located at /home/fendt/LinBoxWebservice.
To Install and Run the Dependent User Client:
- In the LinBoxWebservice directory, type "ant generate.dependent.client"
- The class is compiled to LinBoxWebservice/build/client/build/classes/samples/
quickstart/clients/TransferAgentDependentClient.class and can be imported by other classes.
Functionality:
- Rank
- Run with ant run.user.client -Darg1=rank -Darg2=(matrix-file)
- Determinant
- Run with ant run.user.client -Darg1=determinant -Darg2=(matrix-file)
- Trace
- Run with ant run.user.client -Darg1=trace -Darg2=(matrix-file)
- Valence
- Run with ant run.user.client -Darg1=valence -Darg2=(matrix-file)
- SmithNormalForm
- (Currently broken) Run with ant run.user.client -Darg1=smithNormalForm -Darg2=(matrix-file)
Return to server page