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

Page of 64
 
        conference = bookingService.SaveConference(conference);
 
    }
 
    
catch
 (SoapException e)
 
    {
 
        Console.WriteLine(
"Got error with error code {0}, and message {1}, from Booking API"
e.Detail.InnerXml, e.Message);
 
    }
 
    
 
    PrintConferenceInformation(conference);
 
}
System Unavailable
Running the code below will output a "system unavailable" message.
public
 
void
 ErrorHandling_SystemNotAvailable()
 
{
 
    InitBookingService();
 
    
var
 conference = bookingService.GetDefaultConference();
 
    
var
 start = DateTime.Now.AddHours(1);
 
    
var
 end = start.AddMinutes(10);
 
 
    conference.StartTimeUTC = start.ToString(
"u"
);
 
    conference.EndTimeUTC = end.ToString(
"u"
);
 
 
    
var
 participant = 
new
 Participant {ParticipantCallType = ParticipantType.TMS, ParticipantId = 4};
 
 
    conference.Participants = 
new
 []
 
        {
 
            participant
 
        };
 
    bookingService.SaveConference(conference);
 
 
    
try
            
 
    {
 
        
// By setting the Id to -1, we try to book a new conference, with the same time and participant
 
        conference.ConferenceId = -1;
 
        conference = bookingService.SaveConference(conference);
 
    }
 
    
catch
 (SoapException e)
 
    {
 
        Console.WriteLine(
"Got error with error code {0}, and message {1}, from Booking API"
e.Detail.InnerXml, e.Message);
 
    }
 
 
    PrintConferenceInformation(conference);
 
}   
 
 
private
 
static
 
void
 PrintConferenceInformation(Conference conference)
 
{
 
    
// Output information about the conference. 
 
    Console.Out.WriteLine(conference.ConferenceInfoText);
 
    Console.Out.WriteLine(conference.UserMessageText);
 
    Console.Out.WriteLine(conference.ConferenceId);
 
}
 
 
 
 
 
public
 
void
 Dispose()
 
{
 
    bookingService.Dispose();
 
    remoteSetupService.Dispose();
 
62
Cisco TelePresence Management Suite Extension Booking API Programming Reference Guide