2.5
Table Of Contents
- SOAP API Guide
- Contents
- About This Book
- Introducing VMware Lab Manager SOAP API
- Getting Started with the Lab Manager SOAP API
- Lab Manager API Data Types
- Lab Manager API Method Reference
- ConfigurationCapture
- ConfigurationCheckout
- ConfigurationClone
- ConfigurationDelete
- ConfigurationDeploy
- ConfigurationPerformAction
- ConfigurationSetPublicPrivate
- ConfigurationUndeploy
- GetConfiguration
- GetConfigurationByName
- GetMachine
- GetMachineByName
- GetSingleConfigurationByName
- ListConfigurations
- ListMachines
- LiveLink
- MachinePerformAction
- Index
VMware Lab Manager SOAP API Guide
26 VMware, Inc.
///and sets up authentication and other basic parameters. This method
///returns a CertificateAcceptor object.
/// </summary>
static LabManagerSoap.VMwareLabManagerSOAPinterface GetLMAPI()
{
//
//** Bind to SOAP interface
//
LabManagerSoap.VMwareLabManagerSOAPinterface binding = new
LabManagerSoap.VMwareLabManagerSOAPinterface();
//
//**Allocate caller login object
//
binding.AuthenticationHeaderValue = new
LabManagerSoap.AuthenticationHeader();
binding.Url = binding.Url.Replace("https://qa240.VMware.com",
"https:/demo44.VMware.com");
binding.AuthenticationHeaderValue.username = "jaya";
binding.AuthenticationHeaderValue.password = "vlm";
binding.Timeout = 10 * 60 * 1000; // 10 minutes
ServicePointManager.CertificatePolicy = new CertificateAccepter();
return binding; //** return binding reference
}
}
/// <summary>
/// The CertificateAccepter class automatically accepts the SSL
/// certificate sent by Lab Manager with each API call from a client
/// application.
/// </summary>
public class CertificateAccepter : System.Net.ICertificatePolicy
{
public CertificateAccepter() {}
public bool CheckValidationResult(
System.Net.ServicePoint servicePoint,
System.Security.Cryptography.X509Certificates.X509Certificate
cert,
System.Net.WebRequest webRequest, int iProblem)
{
return true;
}
}//end CertificateAccepter class declaration
}//end namespace declaration