/// <summary> /// Updates content of a meeting in a workspace base on a calendar object. /// </summary> /// <param name="icalText">Updated information about the meeting instance.</param> /// <param name="ignoreAttendees">Whether this is a scheduling-only update, or an update that affects attendees. Null if not specified.</param> /// <returns>The aggregation of UpdateMeetingFromICalResponseUpdateMeetingFromICalResultUpdateMeetingFromICal response or SoapException thrown.</returns> public SoapResult <UpdateMeetingFromICalResponseUpdateMeetingFromICalResult> UpdateMeetingFromICal(string icalText, bool?ignoreAttendees) { UpdateMeetingFromICalResponseUpdateMeetingFromICalResult result = null; SoapException exception = null; try { // Call UpdateMeetingFromICal method. result = this.service.UpdateMeetingFromICal(icalText, ignoreAttendees ?? false, ignoreAttendees.HasValue); // As response successfully returned, the transport related requirements can be captured. this.CaptureTransportRelatedRequirements(); this.ValidateAndCaptureCommonMessageSyntax(); this.VerifyUpdateMeetingFromICalResponse(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 <UpdateMeetingFromICalResponseUpdateMeetingFromICalResult>(result, exception)); }
/// <summary> /// Verifies the response of UpdateMeetingFromICal. /// </summary> /// <param name="result">The UpdateMeetingFromICal response information </param> private void VerifyUpdateMeetingFromICalResponse(UpdateMeetingFromICalResponseUpdateMeetingFromICalResult 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 UpdateMeetingFromICalSoapOut response message. Site.CaptureRequirementIfIsTrue( isResponseValid, 352, @"[In UpdateMeetingFromICal]This [UpdateMeetingFromICal]operation is defined as follows. <wsdl:operation name=""UpdateMeetingFromICal""> <wsdl:input message=""UpdateMeetingFromICalSoapIn"" /> <wsdl:output message=""UpdateMeetingFromICalSoapOut"" /> </wsdl:operation>"); // If the server response pass the validation successfully, we can make sure that the server responds with an UpdateMeetingFromICalSoapOut response message. // Verifies MS-MEETS requirement: MS-MEETS_R354. Site.CaptureRequirementIfIsTrue( isResponseValid, 354, @"[In UpdateMeetingFromICal][if client sends an UpdateMeetingFromICalSoapIn request message]the protocol server responds with an UpdateMeetingFromICalSoapOut response message (section 3.1.4.12.1.2)."); // Verifies MS-MEETS requirement: MS-MEETS_R362. Site.CaptureRequirementIfIsTrue( this.ResponseExists(SchemaValidation.LastRawResponseXml, "UpdateMeetingFromICalResponse"), 362, @"[In UpdateMeetingFromICalSoapOut]The SOAP body contains an UpdateMeetingFromICalResponse element (section 3.1.4.12.2.2)."); // If the server response pass the validation successfully, we can make sure that the UpdateMeetingFromICalResponse is defined according to the schema. // Verifies MS-MEETS requirement: MS-MEETS_R375. Site.CaptureRequirementIfIsTrue( isResponseValid, 375, @"[In UpdateMeetingFromICalResponse]This element[UpdateMeetingFromICalResponse]is defined as follows. <s:element name=""UpdateMeetingFromICalResponse""> <s:complexType> <s:sequence> <s:element name=""UpdateMeetingFromICalResult"" minOccurs=""0""> <s:complexType mixed=""true""> <s:sequence> <s:element name=""UpdateMeetingFromICal""> <s:complexType> <s:sequence> <s:element name=""AttendeeUpdateStatus"" type=""tns:AttendeeUpdateStatus""/> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element> </s:sequence> </s:complexType> </s:element>"); // If the UpdateMeetingFromICalResult element exist, and the server response pass the validation successfully, // we can make sure AttendeeUpdateStatus is defined according to the schema. if (result != null) { this.VerifyAttendeeUpdateStatusComplexType(isResponseValid); } }