2.5

Table Of Contents
VMware, Inc. 49
Chapter 4 Lab Manager API Method Reference
Response
Sample Code: C#
try
{
LabManagerSoap.VMwareLabManagerSOAPinterface binding = new
LabManagerSoap.VMwareLabManagerSOAPinterface();
binding.AuthenticationHeaderValue = new
LabManagerSoap.AuthenticationHeader();
binding.AuthenticationHeaderValue.username = "jaya";
binding.AuthenticationHeaderValue.password = "Lab Manager";
ServicePointManager.CertificatePolicy = new CertificateAccepter();
LabManagerSoap.Machine machine = binding.GetMachine(35);
//** Write to the console all machines in configuration.
Console.WriteLine("Machine = " + machine.name);
Console.WriteLine("id = " + machine.id.ToString());
Console.WriteLine("description = " + machine.description);
Console.WriteLine("internalIP = " + machine.internalIP);
Console.WriteLine("externalIP = " + machine.externalIP);
Console.WriteLine("status = " + machine.status.ToString());
Console.WriteLine("isDeployed = " + machine.isDeployed.ToString());
Console.ReadLine();
}
catch (Exception e)
{
Console.WriteLine("Error: " + e.Message);
Console.ReadLine();
}
Table 4-18. Response
Field Data Type Description
machine Machine Machineobjectmatchingthemachineidentifier.