Cisco Cisco TelePresence Management Suite (TMS) Version 15 Developer's Guide

Page of 33
Code examples 
Cisco TMS Extension Booking API Programming Reference Guide (13.0.1) 
Page 26 of 33 
 
 
Code examples 
Visual Studio .NET using C# and Web-References 
To use Cisco TMSBA in Visual Studio .NET, you need to add a Web Reference to your project (
Project -> 
Add Web Reference
), specify the URL to your Cisco TMS server:  
http://127.0.0.1/tms/external/Booking/BookingService.asmx for the booking API 
Note: Exchange 127.0.0.1 with the name of the web-server Cisco TMS is installed on 
For the remote setup API: 
http://localhost/tms/external/booking/remotesetup/ remotesetupservice.asmx.  
You will be required to authenticate against the web-services to create the reference.  
Remote setup API example 
The code snippet below shows how to loop through all systems in Cisco TMS, and display information 
about each system. 
 
// Specify username and password to authenticate to service. 
// (Can also be done in web.config) 
NetworkCredential credentials = new NetworkCredential(“xxx”, “yyy”, “ZZZ”); 
 
RemoteSetupService remoteSetupService = new RemoteSetupService(); 
remoteSetupService.Credentials = credentials; 
 
// Set API to use version 6 
if (remoteSetupService.ExternalAPIVersionSoapHeaderValue == null) 
 
remoteSetupService.ExternalAPIVersionSoapHeaderValue = new 
RemoteSetupService.ExternalAPIVersionSoapHeader(); 
remoteSetupService.ExternalAPIVersionSoapHeaderValue.ClientVersionIn = 5; 
 
// Get all systems from TMS 
TMSSystem[] tmsSystems = remoteSetupService.GetSystems(); 
 
// Loop through the systems and output information about each system 
foreach (TMSSystem tmsSystem in tmsSystems) 
 
Console.Out.WriteLine(“SystemId: “ + tmsSystem.SystemId + “ System Name:” + 
tmsSystem.SystemName); 
Booking API example 
Note: When using the API as a web-reference, the ParticipantsTypes for “IP Video <-“, “ISDN Video ->” 
etc are created as enumerations called IPTel, IPTel1, etc. The values with an ending 1 are the dial-out, 
whereas without the ending 1 are dial-ins.