2.4

Table Of Contents
VMware, Inc. 51
Chapter 4 Lab Manager API Method Reference
Response
Sample Code: C#
try
{
//** LabManagerSoap is the name of the web reference in Visual Studio
LabManagerSoap.VMwareLabManagerSOAPinterface binding = new
LabManagerSoap.VMwareLabManagerSOAPinterface();
//** Create login
binding.AuthenticationHeaderValue = new
LabManagerSoap.AuthenticationHeader();
binding.AuthenticationHeaderValue.username = "jaya";
binding.AuthenticationHeaderValue.password = "Lab Manager";
ServicePointManager.CertificatePolicy = new CertificateAccepter();
//** Get Configuration object
LabManagerSoap.Configuration Config =
binding.GetSingleConfigurationByName("Config24Capture");
//** Write to the console all configuration properties.
Console.WriteLine("Config name = " + Config.name);
Console.WriteLine("Config id = " + Config.id.ToString());
Console.WriteLine("Config description = " + Config.description);
Console.WriteLine("Config isPublic = " + Config.isPublic.ToString());
Console.WriteLine("Config isDeployed = " + Config.isDeployed.ToString());
Console.WriteLine("Config fenceMode = " + Config.fenceMode.ToString());
Console.WriteLine("Config type = " + Config.type.ToString());
Console.WriteLine("Config owner = " + Config.owner);
Console.WriteLine("Config dateCreated = " +
Config.dateCreated.ToString());
Console.ReadLine();
}
catch (Exception e)
{
Console.WriteLine("Error: " + e.Message);
Console.ReadLine();
}
Table 4-22. Response
Field Data Type Description
configuration Configuration Configurationobject.