VMware

This Question is Answered

2 "helpful" answers available (6 pts)
5 Replies Last post: Aug 11, 2009 9:20 AM by stanbinev  

URGENT API calls to LabManager 4.0 fails posted: Aug 7, 2009 5:19 AM

Click to view vm_wonder's profile Novice 20 posts since
Aug 30, 2007
My organization recently upgraded the Labmanager from v3.0 to v4.0. The methods what we exposed through C# .net assembly started failing after upgrade of labmanager while it worked perfectly in previous versions (both v2.5 and v3.0). Please advice immediately since this is very critical.

The exceptions are thrown in Labmanager SOAP methods like ListConfigurations(), GetSingleConfigurationByName() and probably others too.

(Exception: Could not find Bucket in database given the parameters--->)

Sample code which worked in v3.0 while it fails in v4.0 :

binding = new LabManagerSoap.LabManagerSOAPinterface();
binding.Url = sLabManagerSOAPUrl;
binding.Timeout = 10 * 300 * 1000;

binding.AuthenticationHeaderValue = new LabManagerSoap.AuthenticationHeader();
binding.AuthenticationHeaderValue.username = sUsername;
binding.AuthenticationHeaderValue.password = sPassword;
ServicePointManager.CertificatePolicy = new CertificateAccepter();

//** Get Configurations in Workspace and see if the connection could be established
int configurationType = 1; //** 1=Workspace
LabManagerSoap.Configuration[] WSconfigurations = binding.ListConfigurations(configurationType); <---- exception is thrown here.

Thanks.

Re: URGENT API calls to LabManager 4.0 fails

1. Aug 10, 2009 7:21 AM in response to: vm_wonder
Click to view stanbinev's profile Hot Shot 122 posts since
Feb 14, 2007

This peice of code should/is still working under LM 4. The difference is that in LM 4 everytime you log into LM, in addition to username and password, you need to supply the organization and workspace you are logging into. So the middle section of your code will look like this:

binding.AuthenticationHeaderValue = new LabManagerSoap.AuthenticationHeader();

binding.AuthenticationHeaderValue.username = sUsername;

binding.AuthenticationHeaderValue.password = sPassword;

binding.AuthenticationHeaderValue.organizationname= "MyOrganization";

binding.AuthenticationHeaderValue.workspacename= "MyWorkspace";

Re: URGENT API calls to LabManager 4.0 fails

3. Aug 11, 2009 8:37 AM in response to: vm_wonder
Click to view stanbinev's profile Hot Shot 122 posts since
Feb 14, 2007
You need to substitute these values with values from your system. The name of the organization and name of the workspace where you are logging into.

Re: URGENT API calls to LabManager 4.0 fails

5. Aug 11, 2009 9:20 AM in response to: vm_wonder
Click to view stanbinev's profile Hot Shot 122 posts since
Feb 14, 2007
Something to keep in mind. If you ever want to use a Workspace other than 'main' then you need to define the workspacename field as well. If not specified it defaults to 'main'

Developer Social Media

Communities