4.0

Table Of Contents
VMware, Inc. 37
Chapter 4 Lab Manager API Method Reference
Console.WriteLine("Error: " + e.Message);
Console.ReadLine();
}
GetSingleConfigurationByName
Thiscalltakesaconfigurationname,searchesforitinboththeconfigurationlibraryandworkspaceand
returnsitscorrespondingConfigurationobject.
Syntax
Configuration config = GetSingleConfigurationByName(“Config9”);
Arguments
Response
C# Sample Code
try
{
//** LabManagerSoap is the name of the Web reference in Visual Studio
LabManagerSoap.LabManagerSOAPinterface binding = new
LabManagerSoap.LabManagerSOAPinterface();
//** Create login
binding.AuthenticationHeaderValue = new
LabManagerSoap.AuthenticationHeader();
binding.AuthenticationHeaderValue.username = "jaya";
binding.AuthenticationHeaderValue.password = "Lab Manager";
binding.AuthenticationHeaderValue.organizationname = "MyOrg";
binding.AuthenticationHeaderValue.workspacename = "MyWorkspace";
ServicePointManager.CertificatePolicy = new CertificateAccepter();
//** Get Configuration object
LabManagerSoap.Configuration Config =
binding.GetSingleConfigurationByName("Config24Capture");
//** Write to the console 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();
}
Field Data Type Description
name string Configurationname.
Field Data Type Description
configuration Configuration Configurationobject.