Deploying a Verastream Web Service Project to a Windows Server
Technical Note 10040
Last Reviewed 17-Aug-2006
Applies To
Verastream Host Integrator version 5.5 or higher
Summary
This technical note describes how to deploy a Verastream Host Integrator web service project to a Microsoft Windows server running Apache-Axis, when the Windows server is not the Verastream development machine.
Note: These instructions are for only for Java Web Service Web Builder Projects and are not applicable to .NET Web Builder Web Service Projects.
Before You Begin
This technical note makes the following assumptions:
- Verastream is installed in the default location on Windows. If you have installed Verastream to different locations, make the appropriate path changes when following the directions provided.
- You are using Apache Jakarta Tomcat at the application server. 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.
- You are logged in to the server with administrative privileges (required to modify Tomcat).
The web service project deployment steps vary depending on the source of your Jakarta Tomcat and Apache-AXIS installations. To proceed, follow the steps that match how Tomcat and AXIS are installed on your system.
- or
Method IUsing the Version of Tomcat and Apache Installed by Verastream
A version of Jakarta Tomcat and Apache-AXIS is installed when you install the Verastream Host Integrator server product. If you are using the version of AXIS and Tomcat installed with Verastream Host Integrator version 5.5, follow the steps below to deploy a Verastream web service project.
- Use Verastream Web Builder to create and save a web project.
Note: Verastream Web Builder is only available when Verastream is installed on a machine running Microsoft Windows.
- Copy the <project name>.jar file from <install path>\VHI\projects\<project name> to the remote server's <vhi home>\tomcat\webapps\axis\WEB-INF\lib\ directory.
- Copy deploy.wsdd from the <install path>\VHI\projects\<project name>\webservice directory to a directory on the remote server.
- Use the vhitomcat.bat script to start Tomcat. This script defines CLASSPATH to include the Verastream-related jar files necessary for the AppConn Java connector. Tomcat can be started from the Windows command prompt (DOS), which is useful for debugging.
Note: If Verastream was not installed in the default location, C:\Program Files\vhi, edit vhitomcat.bat and modify VHI_HOME accordingly.
To run Tomcat in from the Windows Command Prompt, use the following command:
<vhi home>\vhi\tomcat\bin\vhitomcat.bat
Note: To run Tomcat as a Windows service (instead of running vhitomcat.bat), see Technical Note 10067.
- Set the AXIS_LIB and AXISCLASSPATH environment variables.
For example, the following commands set AXIS_LIB and AXISCLASSPATH and then verify the definitions.
AXIS_LIB=<vhi home>\vhi\tomcat\webapps\axis\WEB-INF\lib
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
echo %AXISCLASSPATH%
- Navigate to the directory where you saved the deploy.wsdd file (in step 3) and use the java -cp command to deploy your web service.
- The default port number used by Verastream for Apache-AXIS is 8081.
- If the java directory installed with Verastream is not in your path, specify the path. By default, the path is <vhi home>\vhi\jre\bin\java.
java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient
-lhttp://localhost:8081/axis/services/AdminService deploy.wsdd
- In your web browser, go to http://localhost:8081/axis and verify that Apache-AXIS is running. The Apache-AXIS Welcome page should display. If not, either the webapp is not installed, or the application server is not running.
Figure 1 - The Apache-AXIS Welcome Page
- On the Apache-AXIS Welcome page, click Validate.
- 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
- Click your browser Back button (to return to http://localhost:8081/axis), and then click View to view deployed Web Services. Your web service project should be listed.
Method IIUsing a Standalone Version of Tomcat and AXIS (Installed Independently of Verastream)
If you are running Apache-AXIS under a standalone version of Jakarta Tomcat that was installed independently of Verastream, follow the steps below to deploy a Verastream web service project.
- Use Verastream Web Builder to create and save a web project.
Note: Verastream Web Builder is only available when Verastream is installed on a machine running Microsoft Windows.
- Copy the <project_name>.jar file from <install path>\VHI\projects\<project name> to the remote server's <tomcat home>\webapps\axis\WEB-INF\lib\ directory.
- Copy deploy.wsdd from <install path>\VHI\projects\<project name>\webservice to a directory on the remote server.
- Copy wcp.jar, vhiprop.jar and apptrieve.jar from <vhi home>\lib\java to the <tomcat home>\webapps\axis\WEB-INF\lib directory.
- 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.
- Start Tomcat by running the startup.bat script at the command prompt. (Typically, startup.bat is found in the <tomcat home>\bin\ directory).
- Set the AXIS_LIB and AXISCLASSPATH environment variables.
For example, the following commands set AXIS_LIB and AXISCLASSPATH, and verify that they were correctly defined.
Note: The location of your tomcat installation may be different than the example.
AXIS_LIB=<vhi home>\Jakarta-tomcat-<x>\webapps\axis\WEB-INF\lib
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
- Navigate to the directory where you saved deploy.wsdd (in step 3) and use the java -cp command to deploy web service.
- The default port number for Apache-AXIS is 8080. The port number may be different on your host.
- If the java command installed with Verastream is not in your path, specify the path to java.
java -cp %AXISCLASSPATH% org.apache.axis.client.AdminClient
-lhttp://localhost:8080/axis/services/AdminService deploy.wsdd
- In your web browser, go to http://localhost:8080/axis to verify that Apache-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.
- On the Apache-AXIS Welcome page, click Validate.
- 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
- Click your browser back button (to return to http://localhost: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
| 10067 |
Running Host Integrator Server Kit Web Server as a Windows Service |
| 40024 |
Deploying a Verastream Web Service Project to a Linux/UNIX Server |
| 40999 |
Verastream Host Integrator Technical Notes |