NCSA CyberSecurity


Note: For printing purposes, you can SHOW ALL or HIDE ALL instructions.

Author: Terry Fleury (tfleury@ncsa.uiuc.edu)
Last Update: April 13, 2006

Implementation

This document shows you how to deploy a very simple Axis-based web service and how to connect to it with a simple Java application. We asssume the use of Java 1.5 and Axis 1.2.1, but other versions may work as well. We would appreciate hearing from people who have had success with different versions of software.

Web Service / Server-Side Setup

Quick link: SampleService.jws (web service)
Here we give instructions for installing the server-side software. We will be using Tomcat as our Web Services (WS) server. Tomcat requires Java. We will be using Axis as the SOAP implementation, but you should be able to deploy other web services and still use the approaches in the sample code files given below.

In each step below, a 'general' instruction is given first, followed by a link for specific instructions. These specific instructions are initially hidden and can be viewed by clicking on the appropriate link.

Note: For printing purposes, you can SHOW ALL or HIDE ALL the Server-Side specific instructions.

  1. Install and configure Tomcat to work with Proxy Certificates.
    Tomcat does not, by default, accept proxy certificates. So you need to download some special software and configure Tomcat appropriately. Detailed instructions can be found on this page.

  2. Configure Tomcat to perform delgation of GSI credentials.
    In the $CATALINA_HOME/conf/server.xml file, change the mode="ssl" entry to mode="gsi".
    Detailed Instructions...

  3. Install Axis into Tomcat.
    The sample web service we will be using is a JWS endpoint, which is basically a .java file renamed to .jws. This is a very simple deployment mechanism which relies on Axis being installed in Tomcat.
    Detailed Instructions...

  4. Install the sample web service.
    Detailed Instructions...

  5. Finally, restart the Tomcat server.
    Detailed Instructions...
Note that once you have set up Tomcat using the method shown above, you will no longer be able to access the https port using Internet Explorer. This is due to the configuration change in $CATALINA_HOME/conf/server.xml where you set mode="gsi". This configuration requires that httpg be used for the SSL port, and since Internet Explorer does not see httpg as a valid connection protocol, all connections will need to be made with Java clients such as the one shown below.

Client-Side Setup

Quick link: SampleClient.java (Java client)
Now that you have your web service set up and running, you'll probably want to test it out. While the server-side .jws file was rather simple, the client-side .java file is a little more complex because of all the initialization required to connect to a web service.

In each step below, a 'general' instruction is given first, followed by a link for specific instructions. These specific instructions are initially hidden and can be viewed by clicking on the appropriate link.

Note: For printing purposes, you can SHOW ALL or HIDE ALL the Client-Side specific instructions.

  1. Download the sample client Java code.
    Detailed Instructions...

  2. Download Globus/CoG Kit libraries.
    All of the jars needed for compilation and execution of the sample client code can be found in the cvs distribution of Globus (which itself is based on the cvs distribution of the CoG Kit). If you had previously downloaded these globus cvs files, you don't need to download them again. But, if those files were downloaded for the Tomcat server and you are running the client on a different machine, you will need to download them for the client machine.
    Detailed Instructions...

  3. Set the Java CLASSPATH to include the Globus/CoG Kit libraries.
    Detailed Instructions...

  4. Compile and execute the sample client.
    Detailed Instructions...