Run Java Axis Sample Code

Source code build files are located in the
samples/Axis/java
directory, as extracted from the ZIP archive.
  1. Change directory to
    sdk/samples/JAXWS
    , where the JAR files are located, if you are not already there, and set
    CLASSPATH
    . Example settings for Linux and Windows are
    export CLASSPATH=/usr/lib/jvm/java-7-openjdk-i386/lib
    and
    set CLASSPATH=%JAVAHOME%\lib
    Sometimes
    CLASSPATH
    has already been set system wide.
  2. Define
    VMKEYSTORE
    as the path to the Java key store. This is needed to securely access a
    Site Recovery Manager
    Server,
    export VMKEYSTORE=/usr/share/mime/application/x-java-keystore.xml
    and
    set VMKEYSTORE=C:\cygwin\usr\share\mime\application\x-java-keystore.xml
  3. After you build the sample program, you can call it with the run script as follows,
    run.sh com.vmware.samples.recovery.RecoveryPlanList --url <srm-URL> --username <user> --password <passwd>
    If you include the
    --ignorecert
    option, the sample code runs the following to get around an untrusted server certificate:
    System.setProperty("org.apache.axis.components.net.SecureSocketFactory", "org.apache.axis.components.net.SunFakeTrustSocketFactory");