Lab Manager SOAP API Reference
12 VMware, Inc.
Use Microsoft Visual Studio with the Lab Manager WSDL File
MicrosoftVisualStudioprogramminglanguagesaccesstheLab ManagerSOAPAPIthroughobjectsthat
serveasproxiesfortheirserver‐sidecounterparts.WhenmanagedcodeaccessesXMLWebservices,aproxy
classandthe.NETFrameworkhandlealloftheinfrastructurecoding.
BeforeyoucanusetheLab ManagerSOAPAPIwithVisual
Studio,youmustfirstgeneratetheproxyclass
objectfromtheWSDLfile.VisualStudioprovidesanAddaWebReferencewizardtoconnecttoaWebservice
andgeneratethenecessaryartifacts.YoucanaddaWebreferencetoanexistingapplicationorcreateanew
applicationinVisualStudio.
SeeAddingandRemovingWebReferencesintheVisualStudiodocumentation.
To add a Web reference by using Microsoft Visual Studio 2005
1InWindows,selectStart>MicrosoftVisualStudio.NET2005.
2 SelectNewProjecttocreateanewproject,orselectOpentoopenanexistingproject.
3IntheURLtextbox,typehttps://<hostname>/LabManager/SOAP/LabManager.asmxtoobtainthe
servicedescriptionofthe
Lab ManagerWebservice.
4ClickGo.
ThecertificateexchangebetweentheLab Managerserverandthedevelopmentenvironmentclient
begins.Asecurityalertdisplaysthedetailsofthecertificatesentfromtheserver.
5ClickYes.
6 (Optional)IfalertfromtheVisualStudioenvironmentappears,clickYes.
TheMicrosoftVisualStudioenvironmentconnectsto
theWebserviceendpointanddisplaysthe
operationsdescribedintheLab ManagerWebserviceWSDLfile.
7 SelectthetextintheWebreferencenametextboxandtypeLabManager,thenamespaceusedforthisWeb
reference.
LabManagerisoneword,withoutspaces.
8ClickAddReference.
9 (Optional)Ifacertificatewarningmessage
appears,clickYes.
10 ClickYes.
VisualStudioretrievestheservicedescriptionandgeneratestheLabManagerproxyclassthatservesasan
interfacetotheLab ManagerWebservicefromyourapplication.Attheendoftheprocess,theclassisadded
totheWebReferencesfolderoftheproject.(ClickSolutionExplorer
toseeLabManagerSoaplistedintheWeb
Referencesfolder .)
Withthisbasicsetuptaskcompleted,youcanbuildclientapplicationsthatusetheLab ManagerSOAPAPI.
ThefastestwaytobecomefamiliarwiththeAPIisbyreviewingthecodesampleslistedin“Simpleand
AdvancedC#CodeSamples”onpage 13.
N
OTEThesecurityalertmessagesaregeneratedwhentheLab Managerserverusesthedefault,
self‐signedcertificates.YoucanreplacethesecertificatesontheLab Managerserverwithcertificates
purchasedfromVerisign,Thawte,andothercertificateauthorities.