VMware Site Recovery Manager SDK Java (JAX-WS) Samples Readme
VMware Site Recovery Manager SDK Readme
Readme for C# (.NET) Samples
Readme for Java (Axis) samples
|
This document describes how to build and run the VMware sample code that uses the JAX-WS bindings for the Site Recovery Manager 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 Site Recovery Manager SDK directory:
SDK/samples/srm/JAXWS/com/vmware/
The following sections contain information about building and running the JAX-WS Site Recovery Manager API samples.
|
| Note: Information in this document may not be current. For up-to-date information, check these VMware Web sites: |
|
|
|
Building Sample Programs
The build scripts (build.bat or build.sh) generate Site Recovery Manager API Java stubs from the Site Recovery Manager API WSDL, compile the generated stubs, and compile the sample programs.
JAVAHOME Environment Variable
You must set the JAVAHOME environment variable to the base directory of a JDK 1.6 (preferably u45).
WSDL File Dependency
JAX-WS requires a WSDL file for stub generation and compilation. To manage this dependency, the build script performs the following operations:
- Uses the JDK tool
wsimport to generate the Site Recovery Manager Java stubs from the Site Recovery Manager API WSDL file (srm-Service.wsdl).
- Specifies the
-wsdlLocation command line option to wsimport to identify the WSDL file location.
- Copies the the WSDL file and related schema files into the
srm.jar file.
To compile Java code that imports the generated stubs and uses the srm.jar built by the build script, the WSDL file must be in the same location that was specified in the -wsdlLocation command line option. To establish this location, the build script modifies the SrmService class to reference the WSDL location inside the JAR file. You only need to add the srm.jar file to your class path.
Sample Applications
The SDK package includes generated Reference Guide for the available sample applications and helper classes, in this path:
SDK/doc/srm/ReferenceGuide
| Sample |
Description, command-line syntax, and example... |
| RecoveryPlanList |
This sample lists all recovery plans and optionally gets state for the specified plan.
Command line syntax:
run.bat com.vmware.samples.recovery.RecoveryPlanList --url webserviceurl --username username --password password --planname planname |
All samples print a usage summary if you do not specify any options or if you specify --help on the command line.
VMware Resources
Copyright © 1998–2020 VMware, Inc. All rights reserved. This product is protected by copyright and intellectual property laws in the United States and other countries as well as by international treaties. VMware products are covered by one or more patents listed at http://www.vmware.com/go/patents.
VMware is a registered trademark or trademark of VMware, Inc. in the United States and other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies.
Last updated: 27-Jan-2020 5:00 pm | VMware Site Recovery Manager SDK
|