VMware logo

Vmware Site Recovery Manager Appliance Management API Java (JAX-WS) Samples Readme


This document describes how to build and run the VMware sample code that uses the JAX-WS bindings for the Site Recovery Manager Appliance Management API. The samples have been developed to work with the JAX-WS bundled with the JDK 1.8. They are located in sub-directories contained in the following Site Recovery Manager SDK directory:

SDK/samples/drconfig/JAXWS/com/vmware/

The following sections contain information about building and running the JAX-WS Site Recovery Manager Appliance Management API samples.

Note:   Information in this document may not be current. For up-to-date information, check these VMware Web sites:
Beta or Pre-release Products VMware Beta Community
Released SDK ProductsVMware vSphere Web Services SDK

Building Sample Programs

The build scripts (build.bat or build.sh) generate Site Recovery Manager Appliance Management API Java stubs from the Site Recovery Manager Appliance Management 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.8 (preferably u202).

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 Appliance Management Java stubs from the Site Recovery Manager Appliance Management API WSDL file (drconfig-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 drconfig.jar file.

To compile Java code that imports the generated stubs and uses the drconfig.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 DrConfigService class to reference the WSDL location inside the JAR file. You only need to add the drconfig.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/drconfig/ReferenceGuide

Sample Description, command-line syntax, and example...
Configure Configure the Site Recovery Manager

Command line syntax:
run.bat com.vmware.samples.drconfig.ConfigureAppliance --configure --drconfigaddr https://FQDN_or_IP_Address:5480/configureserver/sdk --drconfiguser admin --pscuri pscfqdn:443 --pscuser pscuser

Get Configuration Print the current Site Recovery Manager configuration

Command line syntax:
run.bat com.vmware.samples.drconfig.ConfigureAppliance --get-config --drconfigaddr https://FQDN_or_IP_Address:5480/configureserver/sdk --drconfiguser admin

Clear Clear the Site Recovery Manager configuration

Command line syntax:
run.bat com.vmware.samples.drconfig.ConfigureAppliance --clear --drconfigaddr https://FQDN_or_IP_Address:5480/configureserver/sdk --drconfiguser admin --pscuser pscuser

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