next up previous contents
Next: Applications Up: Optimization Services 1.0 User's Previous: Summary   Contents


Setting up a Solver Service with Tomcat

Download the java binary distribution at

os-distribution-release_number.zip

The server side of the Java distribution is based on the Tomcat 5.5 implementation. After unpacking os-distribution-releaseFnumber.zip there is a directory os-server-1.0 and a single file os.war. For users that have not installed the Tomcat server, os-server-1.0 contains all of the necessary files for a OS Solver Service. If you do not have a Tomcat server running do the following to setup a Tomcat server with the OS Solver Service on a Unix system:

Step 1.
Put the folder os-server-1.0 in the desired location for the OS Solver Service on the server machine.

Step 2.
Connect to the Tomcat bin directory in the os-server-1.0 root and execute ./startup.sh.

Step 3.
Test to see if the server is running the OSSolverService. Open a browser on the server and enter the URL
http://localhost:8080/os/OSSolverService.jws
or
http://127.0.0.1:8080/os/OSSolverService.jws
You should see a message Click to see the WSDL. Click on the link and you should see an XML description of the various methods available from the OSSolverService.

Step 4.
On a client machine, create the file testremote.config with the following lines of text
-serviceLocation http://***.***.***.***:8080/os/OSSolverService.jws
-osil /parincLinear.osil
where ***.***.***.*** is the IP address of the Tomcat server machine. Then, assuming the files testremote.config and parincLinear.osil are in the same directory on the client machine as the OSSolverService execute:
./OSSolverService -config testremote.config
You should get back an OSrL message saying the problem was optimized.

In a Windows environment you may want to start the Tomcat server as a service so you can log off (not shutdown) the machine and have the server continue to run. On a Windows machine do the following:

Step 1.
Put the folder os-server-1.0 in the desired location for the OS Solver Service on the server machine.

Step 2.
Connect to the Tomcat bin directory in the os-server-1.0 root and execute
service.bat install
This will install Tomcat as a Windows service. To remove the service execute
service.bat remove

Step 3.
Connect to the Tomcat bin directory and and double click on the tomcat5w.exe application. This will open a Window for controlling the Tomcat server.

Step 4.
Select the Startup tab and set the Working Directory to the path to os-server-1.0.

Step 5.
Select the General tab and then click the Start button.

Step 6.
Same as Step 3 for Unix.

Step 7:
Same as Step 4 for Unix.

Note: There are many ways to start the Tomcat server and the exact way you choose may be different. See http://tomcat.apache.org/ and check out Tomcat version 5.5 for more detail. But do remember to properly set the Tomcat Working Directory to the path to os-server-1.0. By default, if you start Tomcat on Windows, the Working Directory is set to the Windows system folder, which will yield unpredictable results.

If you already have a Tomcat server with Axis installed do the following:

1.
copy the file os.war into the Tomcat WEB-INF directory in the ROOT folder under webapps.

2.
Follow Steps 2-5 outlined above.

In the directory,

os-server-1.0/webapps/os/WEB-INF/code/OSConfig
there is a configuration file OSParameter.xml that can be modified to fit individual user needs. You can configure such parameters as service name, service URL/URI. Refer to the xml file for more detail. Descriptions for all the parameters are within the file itself.

Below is a summary of the common and important directories and files you may want to know.


next up previous contents
Next: Applications Up: Optimization Services 1.0 User's Previous: Summary   Contents
Kipp Martin 2008-01-16