Getting started with Apache Rampart - a quick guide
2008-11-14
- Download Rampart from here.
- Unzip the downloaded file into your development directory, let us call
the created directory RAMPART_HOME.
- 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.
- Run 'ant' in the $RAMPART_HOME/samples directory.
- Try out the samples in the $RAMPART_HOME/samples/basic directory:
- Start two terminals and set the AXIS2_HOME variable as above in both.
-
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.
- In the $RAMPART_HOME/samples/basic directory, run 'ant client.X' in the other terminal.
- The by now well-known 'Hello world' message should be printed in the client terminal
as part of the ant output.
- 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.
- 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.