This document describes how to build and run the VMware sample code that uses the JAX-WS bindings for the vSphere API. The samples have been developed to work with the JAX-WS bundled with the JDK 1.6. They are located in sub-directories contained in the following vSphere Management SDK directory: SDK/vsphere-ws/java/JAXWS/samples/com/vmware/
The following sections contain information about building and running the JAX-WS vSphere API samples.
JAVAHOME Environment VariableYou must set the JAVAHOME environment variable to the base directory of a JDK 1.6, preferably b22. Converting Shell Scripts for Linux
The vSphere Web Services SDK includes the following shell scripts in the
The shell files in the distribution kit have DOS-style line endings. These do not work
when running these scripts on Linux. Use the Linux command To run these scripts, set the Execute permission on the files:
Building Sample ProgramsThe build scripts (build.sh and build.bat) generate vSphere API Java stubs from the vSphere API WSDL, compile the generated stubs, and compile the sample programs. You can specify the following command line options to control stub generation and compilation.
JAX-WS requires a WSDL file for stub generation and compilation. To manage this dependency, the build script performs the following operations:
To compile Java code that imports the generated stubs and uses the Samples usageAll samples print a usage summary if you do not specify any options or if you specify --help on the command line. You can also find information about the samples in the JAX-WS Samples Reference Documentation. Each package has a class summary that describes one or more samples.
|