This is the source code that provides an implementation of the
XML Secured Payload Profiles using Java.

Installation
============

To build and test the distributable package, the following must be installed:

This distribution
-----------------
1. Unpack the nehta-smi-xsp-*.zip file to the desired location.
    <XSP_HOME> will be used in this document to refer to the root
    directory of this implementation.

Java Development Kit
--------------------
1. Download and install JDK 6 Update 10 or later.
      URL: http://java.sun.com/javase/downloads/index.jsp
      <JDK_HOME> will be used in this document to refer to the root directory
      of the JDK installation.
      <JRE_HOME> will be used in this document to refer to <JDK_HOME>/jre.
2. Add <JDK_HOME>/bin to the path.
3. Create a JAVA_HOME environment variable pointing to <JDK_HOME>.

JCE Policy Files
----------------
The Java Cryptography Extension (JCE) provides cryptography services in the JDK.
The JCE policy files in the JDK download are limited in strength due to the
import control restrictions for some countries. The "unlimited strength"
capabilities are enabled by installing certain policy files into the JRE.
1. Download the JCE Unlimited Strength Jurisdiction Policy Files for the
   installed JDK version.
      URL: http://java.sun.com/javase/downloads/index.jsp
2. Unpack the downloaded ZIP file.
3. Copy the two JAR files (local_policy.jar and US_export_policy.jar) to the
   <JRE_HOME>/lib/security directory.
      Overwrite the existing JAR files in the directory.

Ant
---
1. Download Ant 1.7.0 or later.
      URL: http://ant.apache.org/bindownload.cgi
2. Unpack the downloaded zip file to the desired location.
      <ANT_HOME> will be used in this document to refer to the root directory
      of Ant.
3. Add <ANT_HOME>/bin to the path.

Apache XML Security API
-----------------------
1. Download the Apache XML Security API 1.4.2
      URL: http://xml.apache.org/security
2. Unpack the downloaded ZIP file.
      <AXMLSEC_HOME> will be used in this document to refer to the root
      directory of the Apache XML Security API distribution.
3. Copy the JAR files in <AXMLSEC_HOME>/libs to the <XSP_HOME>lib/
   directory.

Building and running the code
=============================

There is an ANT build file in <XSP_HOME>.

The following commands are available:

  ant clean
    - Cleans (delete) all temporary/rebuildable files.

  ant package
    - Builds the example code.

  ant test
    - Performs the unit testing.

Source code
===========

The source code is the src/main/java directory.

Licensing
=========

Copyright 2009 NEHTA

Licensed under the NEHTA Open Source (Apache) License; you may not use this
file except in compliance with the License. A copy of the License is in the
'license.txt' file, which should be provided with this work.

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
License for the specific language governing permissions and limitations
under the License.
