Use the Included Build
Scripts in the Web Services SDK
If you modify the sample files, or need to rebuild them for any
reason, you can use the
build.bat
or build.sh
script included with the SDK. These scripts
performs all necessary tasks to build the SDK files.You must install the JDK and set
the
JAVAHOME
environment variable.This task shows how to use the build scripts included with the SDK.
- Open a command prompt.
- Navigate to the subdirectory containing thebuild.batandbuild.shfiles.cd %WS_SDK_HOME%\java\JAXWS\
- Run thebuild.bat(orbuild.sh) script by entering its name at the command prompt.buildThe console displays output, starting withGenerating stubs from wsdl. In a few minutes, the process finishes. The wordDoneappears at the command prompt, as shown in the following example. TheGenerating stubs from wsdlmessage appears twice, because this build file generates client stubs using both sets of WSDL declarations, found in the\vimand\vim25subdirectories.Successful Stub Generation and Compilation Using the build.bat ScriptGenerating stubs from wsdl Compiling stubs. ... Done. C:\devprojects\visdk21\SDK\vsphere-ws\java\JAXWS>
When the process finishes, the appropriate
sample
.jar
files show the current
date and time.
To compile without re-generating the stubs from
the WSDL, use the
-w
flag with the build script, as
follows:
build -w
You can run any of the sample applications by
following the instructions in
Running the Web Services SDK SimpleClient Sample Application to Validate Setup