XML and Web Services Security
Sample Applications

Implementation Version: 1.0 EA

Building and Running the Sample Applications With Ant

In order to run the sample applications using the supplied Ant build.xml files, simply follow these steps after you've installed JWSDP 1.2:
For Solaris/Linux:
  1. % export JAVA_HOME=<your J2SE installation directory>
  2. % export JWSDP_HOME=<your JWSDP1.2 installation directory>
  3. % export ANT_HOME=$JWSDP_HOME/apache-ant
  4. % export PATH=$JWSDP_HOME/jwsdp-shared/bin:$PATH
  5. % cd $JWSDP_HOME/xws-security/samples/<sample-name>
  6. % cp build.properties.sample build.properties
  7. edit build.properties as shown here.
  8. To display usage information for the sample,
    % $ANT_HOME/bin/ant 
For WindowsNT/2000/XP:
  1. > set JAVA_HOME=<your J2SE installation directory>
  2. > set JWSDP_HOME=<your JWSDP1.2 installation directory>
  3. > set ANT_HOME=%JWSDP_HOME%\apache-ant
  4. > set PATH=%JWSDP_HOME%\jwsdp-shared\bin;%PATH%
  5. > cd %JWSDP_HOME%\xws-security\samples\<sample-name>
  6. > copy build.properties.sample build.properties
  7. edit build.properties as shown here.
  8. To display usage information for the sample,
    > %ANT_HOME%\bin\ant
Further details for each sample application are available in the README.txt file located under each sample directory.

Editing the build.properties file

The following is a list of the configurable properties file with a description of what needs to be modified:
  1. jwsd.home: your JWSDP1.2 installation directory (Leave this as is)
  2. xws.security.debug: Uncomment this property entry if you wish to turn on debugging for xws-security
  3. jaxrpc.tool.verbose: Set this to true to produce verbose output from the jaxrpc tools (wscompile, etc.)
  4. username: Replace this with the username for an admin user on your Tomcat installation.
  5. password: Replace this with the password for the above user.
  6. url: Replace the host and port information in the URL, as appropriate for your Tomcat installation.
  7. example: The name of the sample (Leave this as is)

List of Sample Applications

samples/dump
This sample application demonstrates basic usage of the security framework by configuring the JAX-RPC server and client to dump the SOAP request and response messages at each end.
 
samples/sign
This sample application demonstrates how to configure a JAX-RPC service to sign server responses. The JAX-RPC client is configured to verify the signed response received from the server.
 
samples/sign2
This sample application extends the previous sample to illustrate how to sign and verify SOAP messages at both the server and client ends. It also demonstrates how to chain actions and how to access an authenticated client Principal.