The SOAP tools generate language-specific classes and methods that match the WSDL definitions. The tools also produce objects and methods that are not in the WSDL files.
- Generated objects. The additional objects provide access to the vSphere Web Service to establish the client-server connection (VimService, AppUtil) and declare the methods defined for the vSphere API (VimPortType, VimService).
- Generated methods. The additional methods are accessor (getter) and mutator (setter) methods for properties. For Java, the method names are constructed by adding get and set prefixes to a property name, and changing the first character of the property name to upper case.
The following table identifies client proxy definitions for the vSphere Web Services SDK WSDL.
Element Access | Java |
---|---|
Access to vSphere Web service (HTTPS/HTTP) | VimService class |
Access to vSphere API methods | VimPortType class |
Access to vSphere API properties | getPropertyName and setPropertyName methods defined for data objects |
vSphere API data objects | Data objects in the vSphere API (see the vSphere API Reference) defined as objects in the proxy interface |
The following code fragments show getter and setter method definitions for the AfterStartupTaskScheduler.minute property.
Java
public int getMinute() { return minute; } public void setMinute(int minute) { this.minute = minute; }
You can extrapolate the getter and setter methods that are available in the client proxy interface from the vSphere API Reference. For example, the ScsiLun data object has a displayName property. For the Java API, you can use a setDisplayName method to assign a string value to the property, and obtain the string value by using the getDisplayName method. The vSphere Web Services SDK includes Java sample code that illustrates how to use the proxy interfaces. See Client Applications for the Web Services API.