Attachmate Worldwide  |   Contact Us  |   NetIQ.com
Home » Support » Solution Library

Technical Notes

Deploying a Verastream Web Service Project to a Linux/UNIX Server
Technical Note 40024
Last Reviewed 17-Aug-2006
Applies To
Verastream Host Integrator version 5.5
Summary

This technical note details how to deploy a Verastream Host Integrator Java web service project to a Red Hat Linux or Solaris server running Apache-Axis.

Before You Begin

The deployment steps vary depending on the source of your Apache Jakarta Tomcat and Apache Axis installations. Tomcat is an implementation of Java Servlet and JavaServer Pages (JSP) technologies. Axis runs within an application server and enables you to implement Java Web Services.

This technical note assumes that you are using Jakarta Tomcat as the application server. Follow the steps that match how Tomcat and Axis are installed on your system.

Before proceeding, note the following:

  • This technical note assumes that Verastream is installed in the default locations, on both Windows and Linux/UNIX machines. If you have installed Verastream to different locations, make the appropriate path changes when following the directions provided.
  • To make modifications to Tomcat, you must be logged in to the server as root.
  • The following conventions are used in this technical note; replace them with the path or name appropriate for your environment:
    • <install path>—the path to the VHI directory, for example, in a UNIX environment, /usr/vhi; in a Windows environment, C:\Program Files\VHI.
    • <machine name>—the name of the server running Tomcat.
    • <path to tomcat>—the path to the tomcat installation, for example, /usr/local/Jakarta-tomcat-4.1.29 or /usr/local/Jakarta-tomcat-5.0.19.
    • <path to java>—the path to the java installation, for example, /usr/vhi/jre/bin.

Using the Version of Tomcat and Axis Installed by Verastream

If you are running Apache-Axis and the version of Jakarta Tomcat that is installed with Verastream Host Integrator, follow the steps below to deploy a Verastream web service project.

  1. Use Verastream Web Builder to create and save a web project.

Note: Verastream Web Builder is available when Verastream Development Kit is installed on a machine running Microsoft Windows.

  1. Copy the <project name>.jar file from <install path>\projects\<project name>webservice\ to the remote server's <install path>/tomcat/webapps/axis/WEB-INF/lib/ directory.

Note: If you use FTP to transfer this file, use the binary transfer method.

  1. Copy deploy.wsdd from the <install path>\projects\<project_name>\webservice folder to any directory on the remote server, for example, your home directory.

Note: If you use FTP to transfer this file, use the ASCII transfer method.

  1. Use the vhitomcat.sh script to start Tomcat. Tomcat can be started as a background process or within the working shell, which is useful for debugging.

For example, to start Tomcat as a background process, use the following command:

<install path>/tomcat/bin/vhitomcat.sh &

To run Tomcat in the working shell, use this command:

<install path>/tomcat/bin/vhitomcat.sh
  1. Set and export the AXIS_LIB and AXISCLASSPATH environment variables using the following commands:
    • Set the AXIS_LIB environment variable:
AXIS_LIB=<install path>/tomcat/webapps/axis/WEB-INF/lib
    • Set the AXISCLASSPATH environment variable (enter all on one line):
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
    • Export the environment variables:
export AXIS_LIB; export AXISCLASSPATH
    • Verify that they were correctly exported:
echo $AXISCLASSPATH
  1. Navigate to the directory where you saved deploy.wsdd (in step 3) and use the java -cp command to deploy your web service.

Note the following:

    • The default port number used by Verastream for Apache Axis is 8081.
    • If java installed with Verastream is not in your path, specify the path.

For example:

<path to java>/java -cp $AXISCLASSPATH org.apache.axis.client.Admin
Client -lhttp://<machine name>:8081/axis/services/
AdminService deploy.wsdd
  1. In your web browser, go to http://<machine name>:8081/axis to verify that Axis is running and the web service is deployed. The Apache-AXIS Welcome page should display. If not, either the webapp is not installed, or the application server is not running.
The Apache-AXIS Welcome Page The Apache-AXIS Welcome Page
  1. On the Apache-AXIS Welcome page, click Validate.
  2. On the Axis Happiness Page (happyaxis.jsp), verify that required and optional libraries are present.

Note: If the following error is displayed, ignore it.

Error: could not find class javax.activation.DataHandler from
file activation.jar
Axis will not work
See http://java.sun.com/products/javabeans/glasgow/jaf.html
  1. Click your browser Back button (to return to http://<machine name>:8081/axis), and then click View to view deployed Web Services. Your web service project should be listed.

Using a Standalone Version of Tomcat and Axis (Installed Independent of Verastream)

If you are running Apache-Axis within a standalone version of Jakarta Tomcat that was installed independent of Verastream, follow the steps below to deploy a Verastream web service project.

  1. Use Verastream Web Builder to create and save a web project.

Note: Verastream Web Builder is available when Verastream Development Kit is installed on a machine running Microsoft Windows.

  1. Copy the <project_name>.jar file from <install path>\projects\webservice\<project name> to the remote server's <tomcat home>/webapps/axis/WEB-INF/lib/ directory.

Note: If you use FTP to transfer this file, use the binary transfer method.

  1. Copy deploy.wsdd from <install path>\VHI\projects\<project name>/webservice to any directory on the remote server, for example, your home directory.

Note: If you use FTP to transfer this file, use the ASCII transfer method.

  1. Copy wcp.jar, vhiprop.jar and apptrieve.jar from <install path>/lib/java on the remote server to the <path to tomcat>/webapps/axis/WEB-INF/lib directory on the same server.
  2. Open <tomcat home>/conf/server.xml in a text editor, add the following entry (shown in red) under <!—Tomcat Root Context ->, and then save the file.
        <!—Tomcat Root Context ->
        <!-- Apache Axis (Web Services Servlet) Context -->
        <Context path="/axis" docBase="axis" debug="0" />

  1. Start Tomcat by running the startup.sh script at the command prompt. (Typically, startup.sh is found in the <tomcat home>/bin/ directory).
  2. Set and export the AXIS_LIB and AXISCLASSPATH environment variables by using the following commands.
    • Set the AXIS_LIB environment variable:
AXIS_LIB=<path to tomcat>/webapps/axis/WEB-INF/lib
    • Set the AXISCLASSPATH environment variable (enter all on one line):
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
    • Export the environment variables:
export AXIS_LIB; export AXISCLASSPATH
    • Verify that they were correctly exported:
echo $AXISCLASSPATH
  1. Navigate to the directory where you saved deploy.wsdd (in step 3) and use the java -cp command to deploy your web service.

Note the following:

    • The default port number for Apache Axis is 8080. The port number may be different on your host.
    • If java installed with Verastream is not in your path, specify the path to java.

For example:

<path to java>/java -cp $AXISCLASSPATH org.apache.axis.client.Admin
Client -lhttp://<machine name>:8080/axis/services/Admin
Service deploy.wsdd
  1. In your web browser, go to http://<machine name>:8080/axis to verify that Axis is running and the web service is deployed. The Apache-AXIS Welcome page should display. If not, either the webapp is not installed, or the application server is not running.

Note: If your host uses a port other than 8080 for AXIS, use that port number.

  1. On the Apache-AXIS Welcome page, click Validate.
  2. On the Axis Happiness Page (happyaxis.jsp), verify that required and optional libraries are present.

Note: If the following error is displayed, ignore it.

Error: could not find class javax.activation.DataHandler from
file activation.jar
Axis will not work
See http://java.sun.com/products/javabeans/glasgow/jaf.html
  1. Click your browser back button (to return to http://<machine name>:8080/axis), and then click View to view deployed Web Services. Your web service project should be listed.

Additional Resources

Additional information about Apache Tomcat and Apache Axis are available online.

Apache Jakarta Tomcat http://jakarta.apache.org/

Apache Axis http://ws.apache.org/axis/

Related Technical Notes
10040 Deploying a Verastream Web Service Project to a Windows Server
40999 Verastream Host Integrator Technical Notes

Did this technical note answer your question?

Yes    No    Somewhat     Not sure yet

Additional comments about this tech note:

Need further help? For technical support, please contact Support.