You can build the sample program that uses Axis Web services for the Site Recovery Manager API. Axis can be downloaded from the Apache Web site, or as the libaxis-java package in some Linux distributions. Axis works with JDK 1.6 and later. Source code build files are located in the samples/Axis/java directory, as extracted from the ZIP archive.
Procedure
- Make sure the Java development kit and Apache Axis are installed and functioning.
- Start the Linux terminal (shell) or Windows command prompt.
- Set the environment variables as shown in the Java and Axis environment variables table.
Table 1.
Java and Axis environment variables
Environment Variable |
Description and Usage Notes |
Example Setting |
AXISHOME |
Complete path to the top‐level Axis installation directory. Must be set before using the build scripts. |
C:\Apache\axis1.4 /usr/share/java |
JAVAHOME |
Path to the binary directory for the Java JDK. |
C:\Java\jdk1.7.0_65 /usr/lib/jvm/java-7-openjdk-i386 |
- Change directory to sdk/samples/Axis/java and run the build.sh script (or on Windows, the build.bat file) to compile the sample Java code into a class file.
- If the build script produces error messages about missing classes (could not find or load a class), edit the script and change the LOCALCLASSPATH line so path names refer to the proper jar file versions. Some Java archives contain symbolic links where a generic file points to a specific version of the jar file.
The script takes time to build the RecoveryPlanList sample program, which lists all recovery plans, or optionally gets state for a specified recovery plan.
Note: The sample program was written for Axis version 1. It may require modifications for version 2.