2.4

Table Of Contents
VMware, Inc. 29
Chapter 3 Lab Manager API Data Types
AuthenticationHeader
ThisdatastructurepassestheusernameandpasswordofthecallerinallLabManager
WebserviceSOAPAPImethods.
Supported API Calls
All
Fields
Sample Usage: C#
/**
** Visual Studio Console application in C#
** LMsoap = web reference name for LM Web service
** Set up login code for all LM Web service method calls
**
**/
try
{
LabManagerSoap.VMwareLabManagerSOAPinterface binding = new
LabManagerSoap.VMwareLabManagerSOAPinterface();
binding.AuthenticationHeaderValue =new
LabManagerSoap.AuthenticationHeader();
binding.AuthenticationHeaderValue.username = "hedley";
binding.AuthenticationHeaderValue.password = "Lab Manager";
ServicePointManager.CertificatePolicy = new CertificateAccepter();
}
catch (Exception e)
{
Console.WriteLine("Error: " + e.Message);
Console.ReadLine();
}
Table 3-3. AuthenticationHeader Fields
Field Data Type Description
username string LabManageraccountusername.
password string LabManageraccountpassword.