Set Up for Development
Using JAX-WS with the Web Services SDK
The samples generated using JAX-WS libraries
and compiled using Java JDK 1.7 include
vim25.jar
and
samples.jar
. You can use these
libraries without generating new stubs and recompiling if you are using the
same version of the JDK.
The following instructions assume that the
target server uses HTTPS, which is the default server configuration.
- If the JDK is not installed, create directories for the JDK and for the vSphere Web Services SDK package.Do not use spaces in the directory names, to avoid issues with some of the included SDK batch and script files.
- Install the Java 2 Platform, Standard Edition (J2SE) 6.0.
- Unpack the components into subdirectories created in Step 1, using the provided installer if appropriate.The J2SE uses an installation wizard. The SDK ZIP file unpacks into the directory you specify.
- Unpack withUse folder namesselected, to maintain the organizational structure.
- On UNIX development systems, use theunzipcommand with the-amodifier, to ensure proper line-endings in the shell scripts. For example:unzip -a VMware-vSphere-SDK-4.1.0-251329.zip
- Import server-certificates and use the Java keytool utility to create avmware.keystore. See Import Server Certificates into the Java Keystore for the Web Services SDK for details.As an alternative, pass the--ignorecertargument at runtime to ignore server-certificate verification for any of the sample Java applications.
- Create the JAVAHOME environment variable.The JAVAHOME environment variable must be set to the root path of the Java Runtime Environment (JRE), such asC:\Program Files\Java\jdk1.7.0_21. The root directory of your Java installation containsbin\javacand other binary files needed to build the stubs and the samples.
- If you are unable to use therun.batscript to run Java samples, add the precompiled sample files,vim25.jarandsamples.jar, to your system CLASSPATH environment variable.To test your setup, run the Java version of SimpleClient, as described in Running the Web Services SDK SimpleClient Sample Application to Validate Setup.