2.5

Table Of Contents
VMware, Inc. 53
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 Configurations in Workspace.
int configurationType = 1; //** 1=Workspace
LabManagerSoap.Configuration [] WSconfigurations =
binding.ListConfigurations(configurationType);
//** Write to the console all configurations
for (int i=0; i < WSconfigurations.Length; i++)
{
Console.WriteLine("Configuration name = " +
WSconfigurations[i].name);
Console.WriteLine("id = " + WSconfigurations[i].id.ToString());
Console.WriteLine("description = "
+WSconfigurations[i].description);
Console.WriteLine("isPublic = " +
WSconfigurations[i].isPublic.ToString());
Console.WriteLine("isDeployed = "+
WSconfigurations[i].isDeployed.ToString());
Console.WriteLine("fenceMode = " +
WSconfigurations[i].fenceMode.ToString());
Console.WriteLine("type = " + WSconfigurations[i].type.ToString());
Console.WriteLine("owner = " + WSconfigurations[i].owner);
Console.WriteLine("dateCreated = " +
WSconfigurations[i].dateCreated.ToString());
Console.WriteLine();
}
Table 4-24. Response
Field Data Type Description
configurations[] ConfigurationArray ArrayofConfigurationobjects.