Getting started with Apache Rampart - a quick guide

2008-11-14
  1. Download Rampart from here.
  2. Unzip the downloaded file into your development directory, let us call the created directory RAMPART_HOME.
  3. Set the AXIS2_HOME variable to point to your Axis2 installation. This is the same path as the AXIS_HOME set by the tomcat start-up and shutdown scripts in your development environment.
  4. Run 'ant' in the $RAMPART_HOME/samples directory.
  5. Try out the samples in the $RAMPART_HOME/samples/basic directory:
    1. Start two terminals and set the AXIS2_HOME variable as above in both.
    2. In the $RAMPART_HOME/samples/basic directory, run 'ant service.X', where X is 01-10 in the first terminal. This starts an axis engine embedded in a simple HTTP server. Should there be a port conflict, change the ports from 8080 in the 'build.xml' file and retry.
    3. In the $RAMPART_HOME/samples/basic directory, run 'ant client.X' in the other terminal.
    4. The by now well-known 'Hello world' message should be printed in the client terminal as part of the ant output.
  6. To understand the above samples better, use the TCP monitor introduced in tutorial 1. You need to change the ports in the 'build.xml' file in order to use the monitor.
  7. In the samples, please note how the service implementation (SimpleService.java) does not contain any security specific code. These are all made in the 'services.xml' file. The only security related code in the client (Client.java) are the lines that read a configuration file (names client.axis2.xml). In both the services.xml, and the client.axis2.xml file, handler chains (InFlowSecurity and OutFlowSecurity, respectively) specifies the security handler(s) (PWCBHandler.java) that is to be run for all in- and outgoing SOAP requests.