2.5

Table Of Contents
VMware Lab Manager SOAP API Guide
18 VMware, Inc.
AnalertfromtheVisualStudioenvironmentmightappear.ClickYestoproceed.
TheMicrosoftVisualStudioenvironmentconnectstotheWebserviceendpoint
anddisplaystheoperationsdescribedintheLab ManagerWebserviceWSDL.
7 SelectthetextintheWebreferencenametextboxandrenametheWebreference
to
LabManagerSoap,thenamespaceusedforthisWebreference.
“LabManagerSoap”isoneword,withoutspaces.
8ClickAddReferencetocompletetheprocess.
Acertificatewarningmessagemightappear.ClickYes.
9ClickYesagaintoproceed.
Formoreinformation,seethe“A d d i n g andRemovingWebReferences”topicin
theVisualStudiodocumentation.
VisualStudioretrieves
theservicedescriptionandgeneratesaproxyclass
(LabManagerSoap)thatservesasaninterfacetotheLab ManagerWebservicefrom
yourapplication.Attheendoftheprocess,theclassgetsaddedtotheWebReferences
folderoftheproject.(ClickSolutionExplorertoseeLabManagerSoaplistedintheWeb
References
folder.)
Withthisbasicsetuptaskcompleted,youcanbuildclientapplicationsthatusethe
Lab ManagerWebServiceSOAPAPI.ThefastestwaytobecomefamiliarwiththeAPI
isbywalkingthroughthecodesamplelistedinthenextsection.
Simple and Advanced Code Samples
Thissectioncontainstwocodesamples—onesimpleandonemorecomplex—written
inC#usingtheMicrosoftVisualStudio2003IDE.
AssumingthatyouhaveaLab Managerinstancerunning,yourprogramming
environmentissetup,andyouhavetheappropriatepermissionsontheLab Manager
server(see“Requirements”onpage 16),youcantest
basicAPIprogramming
connectivitybetweenyourdevelopmentworkstationandyourLab ManagerWeb
servicebyusingthe“SimpleC#ConsoleApplication.Copythecodelistingdisplayed
inthenextsection,andpasteitintoyourMicrosoftVisualStudio2003environment.
N
OTEVMwareassumesyouarefamiliarwithbasicprogrammingconceptsand
alreadyhaveaprogrammingdevelopmentenvironmentsetuponyourcomputer.If
youareusingaprogramminglanguageotherthanC#andaWebservicesdevelopment
environmentotherthanMicrosoftVisualStudio2003,seetheappropriate
documentationformoreinformation.