/// <summary> /// Adds a meeting to an existing workspace. /// </summary> /// <param name="organizerEmail">The e-mail address of the meeting organizer.</param> /// <param name="uid">A unique identifier represents this meeting</param> /// <param name="sequence">The sequence or revision number of this meeting instance. Null if not specified.</param> /// <param name="utcDateStamp">The time that this meeting instance was created.</param> /// <param name="title">The subject of this meeting.</param> /// <param name="location">The physical or virtual location in which this meeting is to take place.</param> /// <param name="utcDateStart">The time that this meeting begins.</param> /// <param name="utcDateEnd">The time that this meeting ends.</param> /// <param name="nonGregorian">Whether the meeting organizer is using the Gregorian calendar. Null if not specified.</param> /// <returns>The aggregation of AddMeetingResponseAddMeetingResult response or SoapException thrown.</returns> public SoapResult <AddMeetingResponseAddMeetingResult> AddMeeting(string organizerEmail, string uid, uint?sequence, DateTime?utcDateStamp, string title, string location, DateTime utcDateStart, DateTime utcDateEnd, bool?nonGregorian) { AddMeetingResponseAddMeetingResult result = null; SoapException exception = null; try { // Call AddMeeting method. result = this.service.AddMeeting(organizerEmail, uid, sequence ?? 0, sequence.HasValue, utcDateStamp ?? default(DateTime), utcDateStamp.HasValue, title, location, utcDateStart, utcDateEnd, nonGregorian ?? false, nonGregorian.HasValue); // As response successfully returned, the transport related requirements can be captured. this.CaptureTransportRelatedRequirements(); this.ValidateAndCaptureCommonMessageSyntax(); this.VerifyAddMeetingResponse(result); } catch (SoapException ex) { exception = ex; // As response successfully returned, the transport related requirements can be captured. this.CaptureTransportRelatedRequirements(); // Validate soap fault message structure and capture related requirements. this.ValidateAndCaptureSoapFaultRequirements(exception); } return(new SoapResult <AddMeetingResponseAddMeetingResult>(result, exception)); }
/// <summary> /// Verifies the AddMeeting Response. /// </summary> /// <param name="result">The response information of AddMeeting</param> private void VerifyAddMeetingResponse(AddMeetingResponseAddMeetingResult result) { bool isResponseValid = ValidationResult.Success == SchemaValidation.ValidationResult; // If the server response pass the validation successfully, we can make sure that the server responds with an AddMeetingSoapOut response message. Site.CaptureRequirementIfIsTrue( isResponseValid, 36, @"[In AddMeeting]This [AddMeeting]operation is defined as follows. <wsdl:operation name=""AddMeeting""> <wsdl:input message=""AddMeetingSoapIn"" /> <wsdl:output message=""AddMeetingSoapOut"" /> </wsdl:operation>"); // If the server response pass the validation successfully, we can make sure that the server responds with an AddMeetingSoapOut response message. // Verifies MS-MEETS requirement: MS-MEETS_R38. Site.CaptureRequirementIfIsTrue( isResponseValid, 38, @"[In AddMeeting][if the client sends an AddMeetingSoapIn request message]and the protocol server responds with an AddMeetingSoapOut response message(section 3.1.4.1.1.2)."); // Verifies MS-MEETS requirement: MS-MEETS_R47. Site.CaptureRequirementIfIsTrue( this.ResponseExists(SchemaValidation.LastRawResponseXml, "AddMeetingResponse"), 47, @"[In AddMeetingSoapOut]The SOAP body contains an AddMeetingResponse element (section 3.1.4.1.2.2)."); // If the server response pass the validation successfully, we can make sure that the AddMeetingResponse is defined according to the schema. // Verifies MS-MEETS requirement: MS-MEETS_R65. Site.CaptureRequirementIfIsTrue( isResponseValid, 65, @"[In AddMeetingResponse]This element[AddMeetingResponse]is defined as follows. <s:element name=""AddMeetingResponse""> <s:complexType> <s:sequence> <s:element name=""AddMeetingResult"" minOccurs=""0""> <s:complexType mixed=""true""> <s:sequence> <s:element name=""AddMeeting"" type=""tns:AddMeeting""/> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element>"); // If the server response pass the validation successfully, we can make sure that AddMeeting operation used when adding meeting not based on the Gregorian calendar. // Verify MS-MEETS requirement: MS-MEETS_R39 Site.CaptureRequirementIfIsTrue( isResponseValid, 39, @"[In AddMeeting]This operation [AddMeeting]MUST be used when adding meetings not based on the Gregorian calendar, because the iCalendar format as used in the AddMeetingFromICal operation (section 3.1.4.2) does not support non-Gregorian recurring meetings."); // If the server response pass the validation successfully, we can make sure that AddMeeting operation was not used to add a recurring meeting workspace. // Verify MS-MEETS requirement: MS-MEETS_R41 Site.CaptureRequirementIfIsTrue( isResponseValid, 41, @"[In AddMeeting]This operation [AddMeeting]MUST NOT be used to add meetings to a recurring meeting workspace."); // If AddMeetingResult element exist, and the server response pass the validation successfully, // we can make sure the AddMeeting is defined according to the schema. if (result != null) { this.VerifyAddMeetingComplexType(isResponseValid); } }