VMware vSphere Web Services SDK Readme
Readme for Java Samples
Readme for C# (.NET) Samples
Welcome to the VMware vSphere Web Services SDK. This Readme contains these topics:
|
Note: Information in this document may not be current. For up-to-date information, check these VMware Web sites: |
|
|
Whats in the SDK Package?
The vSphere Web Services SDK is a zip file that provides:
- Sample code that demonstrates common tasks involved in using the vSphere API to manage the virtual infrastructure.
The sample code includes compiled and ready-to-run Java class files, as well as
Java and
C# source code files. See the respective Readmes (readme_java.html, readme_dotnet.html) for information about building and using the samples.
- Web Services Definition Language (WSDL) definitions that describe the API for accessing vSphere servers,
such as ESX, ESXi, and vCenter Server systems. The WSDL is divided into two separate files:
- vim.wsdl
- vimService.wsdl (imports the vim.wsdl. Use the vimService.wsdl file to generate stubs.)
- Batch files and shell scripts to automate the process of generating client-side stubs, and for re-building the sample applications.
-
For Java developers, compiled client-side libraries (vim.jar, vim25.jar, apputils.jar, samples.jar) are available for testing and development purposes.
-
For C# developers, the Microsoft Visual Studio project files (.sln) have been included.
- Reference documentation (VMware vSphere API ReferenceGuide) that provides language-neutral
descriptive information (object type definitions, properties, and method signatures, for example) for
the VMware vSphere API.
The vSphere Web Services SDK zip file contains these top-level directories and
sub-directories. For more information about the content within each sub-directory (in particular,
the Java samples sub-directory and the C# samples sub-directory), see the appropriate readme file.
Directory structure (under \SDK):
Directory or filename |
Description |
\doc |
Directory that contains the SDK Terms and Conditions document. User guides
(Developers Setup Guide and Programming Guide) are available at
http://www.vmware.com/support/developer/vc-sdk/index.html |
\doc\ReferenceGuide |
Directory that contains the VMware vSphere API Reference files.
Use a web browser to open index.html. |
\samples |
Top-level directory that contains the language-specific versions of the sample client
applications, one for Java, one for C#. |
\samples\Axis\java |
Directory that contains batch files, Java source code (in package hierarchy),
compiled bytecodes, Java stub classes for the samples, and a vim.jar file that contains
the client-side stubs built using the vim.wsdl. |
\samples\Axis\java\java\com\vmware |
Directory that contains Java samples.
See the Readme for Java samples for details. |
\samples\DotNet\cs |
Directory that contains batch files, plus several other sub-directories containing
Windows C# sample applications (in the appropriate namespace structure), the Microsoft Visual Studio
project files (.sln files). |
\sms |
Directory that contains the Storage Management Server SDK. The Storage Management Service (SMS)
is installed by default on vCenter Server systems. The services provide an experimental Web-services-based API
(SMS API) that provides centralized access to all storage information, across an entire datacenter. Obtaining
information at this level of granularity is much simpler using the SMS API than using the general-purpose vSphere
API. See the SMS SDK Readme for more information. |
\wsdl\vim\vim.wsdl |
WSDL file that contains the VMware vSphere API definitions. |
\wsdl\vim\vimService.wsdl |
WSDL file that defines the Web services endpoint. Your client
application uses this endpoint to access vSphere services.
The vimService.wsdl file references the vim.wsdl with an import statement;
specify the vimService.wsdl file (rather than vim.wsdl directly) when you use a generation tool. |
\wsdl\vim25\vim.wsdl |
WSDL file that contains the VMware vSphere API definitions.
Includes support for new features of the vSphere object model. |
\wsdl\vim25\vimService.wsdl |
WSDL file defining the Web services endpoint. Your client application
uses this endpoint to access vSphere services.
The vimService.wsdl file references the vim.wsdl with an import statement;
specify the vimService.wsdl file (rather than vim.wsdl directly) when you use a generation tool.
|
What is the VMware vSphere API?
The VMware vSphere API (vSphere API) provides language-neutral interfaces to the vSphere management framework. In much the same way that JMX (Java
Management Extension) provides an infrastructure for managing and monitoring Java applications, the VMware vSphere API lets you do the same for VMware vSphere
components (for example, virtual machines, host systems) and services (such as performance manager).
The API provides industry-standard Web services that are hosted on VMware vSphere systems, including ESX, ESXi, and vCenter systems. The API complies with the Web Services Interoperability Organization (WS-I) Basic Profile 1.0,
which includes XML Schema 1.0, SOAP 1.1, WSDL 1.1. For more information about the WS-I Basic Profile 1.0,
see:
http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16.html
The Web services provide life-cycle operations and operations for managing
vSphere componentscompute resources, virtual machines, networks, storage, and the like.
Accessing VMware vSphere Web Servers
By default, a VMware vSphere Server listens on port 443, the well-known port for Secure HTTP (HTTPS), which uses SSL (secure sockets layer) to encrypt communications between client application and server. To access a server, use the URN from a web-services client application, as in:
https://FQDN_Server_or_IP_Address/sdk
The certificate of the target server must reside on the client machine.
See Obtaining Server Certificates in Appendix A (Server Certificates Reference) of the
Developers Setup Guide.
To configure the server to support HTTP (rather than HTTPS), see
Modifying the Server Configuration to Support HTTP in Appendix A (Server Certificates Reference)
of the Developers Setup Guide.
Samples Listing
The vSphere Web Services SDK includes samples for Java and Microsoft .NET (C#).
Documentation
The API ReferenceGuide is included in the vSphere Web Services SDK package, located in the /doc sub-directory of the SDK package. Other current documentation, such as Release Notes, Developers Setup Guide, and Programming Guide, is located online only.
Be sure to read the Release Notes for late-breaking and updated information.
Checklist of Setup Tasks
Setting up your workstation for developing client applications using the vSphere Web Services SDK involves several steps. Assuming you are already developing applications of one kind or another, some of the steps below may be unnecessary. Modify the details of the process as appropriate for the specifics of your system. See the Developers Setup Guide for complete details. Also see the appropriate readme for your development platform (readme_java.html, readme_dotnet.html).
To get started with the vSphere Web Services SDK:
- Choose a development language (Java or C#) to use for Web-services client application development.
- Identify the target server (or servers) that youll use during development. (Target servers refers to the vCenter, ESX, or ESXi systems that will be the targets of the client applications that you develop.)
- Verify network access to each server by launching a browser and connect to its URL:
https://esx-server-name-or-virtual-center-server-name
Note that ESX and vCenter default configurations use SSL (secure sockets layer) to encrypt communications, thus the default protocol used is HTTPS (as shown above). However, target servers can be configured to use HTTP (rather than HTTPS). See Modifying the Server Configuration to Support HTTP in the Developers Setup Guide for details.
If a target server is configured for HTTPS, you must import its server-certificates as described in
Obtaining Server Certificates in the
Developers Setup Guide.
Note: |
Java developers can circumvent the server-certificate verification (by the client, which occurs during the SSL handshake) in their code by using the SunFakeTrustSocketFactory class (available in the Axis client libraries (org.apache.axis.components.net package). The Java samples included with the SDK use this technique (via an optional command-line argument, --ignorecert).
If you plan to use the --ignorecert option, or use this technique in your own code, you do not need to obtain the server certificates. However, you must still set the VMKEYSTORE environment variable (as discussed in the Readme for Java Samples) to use the Run script (run.bat, run.sh).
|
|
|
-
Install the development environment appropriate for your programming language.
- For C#, use one of the Microsoft development environments,
such as Microsoft Visual Studio 2008 or 2005, Microsoft Visual Studio .NET 2003, or Microsoft Visual C#.
(VMware recommends using Microsoft Visual Studio 2008 or 2005; both include the required .NET Framework.)
For more information, visit:
http://msdn2.microsoft.com
- For Java, use the JDK. VMware recommends JDK 6; you can use JDK 5.0,
Update 8 or later. For more information, visit:
http://java.sun.com/javase/downloads/
- Obtain the appropriate Web-services client tools (XML parser, WSDL-to-proxy-code generation tools, runtime) for your programming language:
-
Configure environment and other settings on the workstation (as described in the appropriate language-specific
sections in the Developers Setup Guide),
or in the respective readme files (readme_java.html,
readme_dotnet.html) for the samples.
VMware Resources
Copyright © 2010 VMware, Inc. All rights not expressly granted herein
are reserved.
Last updated: 05Mar2010 | VMware vSphere Web Services SDK
|