Tutorials

Jini Example
Jxta Example
Web Services

Related

Jxta
Jini
Web Services

For More Info

From P2P to Web Services and Grids: Peers in a Client/Server World
Ian J. Taylor, 2004
Publisher: Springer
ISBN: 1-85233-869-5
The following list describes the installation process:
  1. Download and install Tomcat; see (http://jakarta.apache.org/tomcat/) and its various dependencies; it will be assumed that Tomcat is installed in /usr/tomcat/.
  2. Download and install Apache Axis; see http://ws.apache.org/axis/; in the configuration here, Axis is installed in the /usr/axis directory.
  3. In the Tomcat installation, there is a directory where Web applications are placed (/usr/tomcat/webapps). Copy the Axis /usr/axis/webapps/axis here.
  4. Set up the environment variables and start Tomcat (see below); it will, by default, run locally on port 8080
  5. Go to the Axis home page on the server at http://localhost:8080/axis/. You should see a screen similar to Fig 1 below
  6. Press the first tag named Validate the local installation's configuration. This page will list the various dependencies needed for a correct installation (see Fig 2). If there are problems, it will list them and provide solutions. Step through these one by one and reload this page to check that each problem has been solved (*)

(*) From various tests, the only missing file that is needed to run Axis is activation.jar. So, following the link to download the JAL library then copy the activation.jar file in $CATALINA_HOME/shared/lib to solve the problem. Note also that you will have to restart the Tomcat server (after you have installed activation.jar) in order for this to be updated.

Figure 1 Figure 2 Click image to enlarge

Setting Environment Variables and Starting Tomcat

In the /usr/tomcat/webapps) directory, there is a WEB-INF sub-directory, which contains the basic configuration information and sub-directories that contain, amongst other things, the Java libraries (in lib and the Web service classes to be deployed (in classes). At this stage, some environment variables need to be set up to specify things like the Axis home directory, the library directory and the Java classpath needed for the compilation of this example. Below, a snippet from .tcshrc is given that shows how the various jar files from the /usr/tomcat/webapps/lib directory are added to the classpath. Further, the PATH environment variable is updated for easy access to the start-up scripts for the Tomcat Web server:

setenv CATALINA_HOME /usr/tomcat

setenv AXIS_HOME $CATALINA_HOME/webapps/axis 
setenv AXIS_LIB $AXIS_HOME/WEB-INF/lib
setenv AXISCLASSPATH $AXIS_LIB/axis.jar:$AXIS_LIB/commons-discovery.jar:
$AXIS_LIB/commons-logging.jar:$AXIS_LIB/jaxrpc.jar:$AXIS_LIB/saaj.jar:
$AXIS_LIB/log4j-1.2.8.jar:$AXIS_LIB/xml-apis.jar: $AXIS_LIB/xercesImpl.jar 

setenv PATH $CATALINA_HOME/bin
setenv CLASSPATH ./:$AXISCLASSPATH

You can start the Tomcat Web server using the following script (in /usr/tomcat/bin):
startup.sh

and shut it down using the following script:
shutdown.sh

Now, your're ready to write and deploy your Web service...

next - back to index