3.0
Table Of Contents
- SOAP API Guide
- Contents
- About This Book
- Introducing VMware Lab Manager SOAP API
- Getting Started with the Lab Manager SOAP API
- Lab Manager API Data Types
- Lab Manager API Method Reference
- ConfigurationCapture
- ConfigurationCheckout
- ConfigurationClone
- ConfigurationDelete
- ConfigurationDeploy
- ConfigurationPerformAction
- ConfigurationSetPublicPrivate
- ConfigurationUndeploy
- GetConfiguration
- GetConfigurationByName
- GetMachine
- GetMachineByName
- GetSingleConfigurationByName
- ListConfigurations
- ListMachines
- LiveLink
- MachinePerformAction
- Index
Lab Manager SOAP API Guide
16 VMware, Inc.
VisualStudioretrievestheservicedescriptionandgeneratesaproxyclass
(LabManagerSoap)thatservesasaninterfacetotheLab ManagerWebservicefrom
yourapplication.Attheendoftheprocess,theclassisaddedtotheWebReferences
folderoftheproject.(ClickSolutionExplorertoseeLabManagerSoaplistedin
theWeb
Referencesfolder .)
Withthisbasicsetuptaskcompleted,youcanbuildclientapplicationsthatusethe
Lab ManagerSOAPAPI.ThefastestwaytobecomefamiliarwiththeAPIisby
reviewingthecodesamplelistedin“SimpleandAdvancedCodeSamples”onpage 16.
Simple and Advanced Code Samples
Thissectioncontainstwocodesamples—onesimpleandonemorecomplex—written
inC#usingtheMicrosoftVisualStudio2003IDE.
AssumingthatyouhaveaLab Managerinstancerunning,yourprogramming
environmentissetup,andyouhavetheappropriatepermissionsontheLab Manager
server(see“Requirements”onpage 13),youcantest
basicAPIprogramming
connectivitybetweenyourdevelopmentworkstationandyourLab ManagerWeb
servicebyusingthe“SimpleC#ConsoleApplication.”Copythecodelistingdisplayed
inthenextsection,andpasteitintoyourMicrosoftVisualStudio2003environment.
Thecodeperformsseveralsimpletasks.Thefirsttwotasks(bindingto
theWebservice
andprovidingcredentials)aretypicallyrequiredofanyapplicationthatmakescallsto
aLab ManagerWebservice:
BindstotheLab ManagerSOAPAPI.
SetsuptheusernameandpasswordformakingaSOAPcall.
SetsuptheServicePointManagercertificatepolicytoaccepttheSSLcertificate.You
mustsetupthecertificatepolicytoacceptallcertificatestoconnecttotheAPI.
Makesacalltogetaconfigurationobjectbasedonname.
Displaysallconfigurationfieldsintheconsole.
N
OTEVMwareassumesyouarefamiliarwithbasicprogrammingconceptsand
alreadyhaveaprogrammingdevelopmentenvironmentsetuponyourcomputer.If
youareusingaprogramminglanguageotherthanC#andaWebservicesdevelopment
environmentotherthanMicrosoftVisualStudio2003,seetheappropriate
documentationformoreinformation.