Run a Sample Application Using the Provided Scripts in the Web Services SDK
You can use the run.bat or run.sh script to run any of the Java samples. The SimpleClient sample is a good choice to verify that your installation is correct. The path to the source file for SimpleClient is:
%WS_SDK_HOME%\java\JAXWS\samples\com\vmware\general\SimpleClient.java
When you run the script, specify the Java class for the sample application along with the --url, --username, and --password switches on the command line. Include the complete package name in the Java class specification. The following statement shows the general format for using the run.bat script to run the SimpleClient sample application from the Java samples subdirectory for JAX-WS:
run.bat com.vmware.general.SimpleClient --url https://yourFQDNservername/sdk --username username --password password [--ignorecert ignorecert]
The following example shows sample output from the SimpleClient sample program.
Sample Output of a Successful Run of SimpleClient, Using Precompiled Java Sample
Object Type : Folder Reference Value : ha-folder-vm Property Name : name Property Value : vm Object Type : HostSystem Reference Value : ha-host Property Name : name Property Value : sdkpubslab-02.eng.vmware.com Object Type : ResourcePool Reference Value : ha-root-pool Property Name : name Property Value : Resources Object Type : Folder Reference Value : ha-folder-host Property Name : name Property Value : host Object Type : ComputeResource Reference Value : ha-compute-res Property Name : name Property Value : sdkpubslab-02.eng.vmware.com Object Type : VirtualMachine Reference Value : 16 Property Name : name Property Value : Windows_2K3_VM ... Object Type : Datacenter Reference Value : ha-datacenter Property Name : name Property Value : ha-datacenter Object Type : Folder Reference Value : ha-folder-root Property Name : name Property Value : ha-folder-root
To run the precompiled SimpleClient from the command prompt, do the following procedure.