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:
- % export JAVA_HOME=<your J2SE installation directory>
- % export JWSDP_HOME=<your JWSDP1.2 installation directory>
- % export ANT_HOME=$JWSDP_HOME/apache-ant
- % export PATH=$JWSDP_HOME/jwsdp-shared/bin:$PATH
- % cd $JWSDP_HOME/xws-security/samples/<sample-name>
- % cp build.properties.sample build.properties
- edit build.properties as shown here.
- To display usage information for the sample,
% $ANT_HOME/bin/ant
For WindowsNT/2000/XP:
- > set JAVA_HOME=<your J2SE installation directory>
- > set JWSDP_HOME=<your JWSDP1.2 installation directory>
- > set ANT_HOME=%JWSDP_HOME%\apache-ant
- > set PATH=%JWSDP_HOME%\jwsdp-shared\bin;%PATH%
- > cd %JWSDP_HOME%\xws-security\samples\<sample-name>
- > copy build.properties.sample build.properties
- edit build.properties as shown here.
- 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.
The following is a list of the configurable properties file with a
description of what needs to be modified:
- jwsd.home: your JWSDP1.2 installation directory (Leave this
as is)
- xws.security.debug: Uncomment this property entry if you
wish to turn on debugging for xws-security
- jaxrpc.tool.verbose: Set this to true to produce verbose
output from the jaxrpc tools (wscompile, etc.)
- username: Replace this with the username for an admin
user on your Tomcat installation.
- password: Replace this with the password for the above
user.
- url: Replace the host and port information in the URL, as
appropriate for your Tomcat installation.
- 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
.