After building, you can run the sample program that uses JAX‐WS bindings for the Site Recovery Manager API. The program was developed to work with the JAX‐WS framework that is bundled with the JDK 1.6 and later.
Procedure
- Change directory to sdk\samples\JAXWS, where the JAR files are located, if you are not already there, and set CLASSPATH. Sometimes %CLASSPATH% has already been set system wide. Example settings for Linux and Windows are
export CLASSPATH=/usr/lib/jvm/java-7-openjdk-i386/lib
and set CLASSPATH=%JAVAHOME%\lib
.
- Define VMKEYSTORE as the path to the Java key store. This is needed to securely access Site Recovery Manager Server.
export VMKEYSTORE=/usr/share/mime/application/x-java-keystore.xml
set VMKEYSTORE=C:\cygwin\usr\share\mime\application\x-java-keystore.xml
- Call the run script or batch file. This sample program prints its usage summary, as if you specified --help on the command line,
run.sh com.vmware.samples.recovery.RecoveryPlanList
or run.bat com.vmware.samples.recovery.RecoveryPlanList
.
- As you can see from the usage message, the RecoveryPlanList sample code requires a user name and password for log in to the Site Recovery Manager administrator account. You need to pass in additional options:
--username srmadmin --password secret --planname myRecoveryPlan