/// <summary> /// Verify the SendItemResponseType structure in section 2. /// </summary> /// <param name="sendItemResponse">A SendItemResponseType instance.</param> private void VerifySendItemResponseTypeSchema(SendItemResponseType sendItemResponse) { // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCORE_R50"); // Verify MS-OXWSCORE requirement: MS-OXWSCORE_R50 // The schema is validated and the response of SendItem operation is not null, so this requirement can be captured. Site.CaptureRequirementIfIsNotNull( sendItemResponse, 50, @"[In m:SendItemResponseType Complex Type] [The type SendItemResponseType is defined as follows:] <xs:complexType name=""SendItemResponseType""> <xs:complexContent> <xs:extension base=""m:BaseResponseMessageType"" /> </xs:complexContent> </xs:complexType>"); // Verify the BaseResponseMessageType schema. this.VerifyBaseResponseMessageType(sendItemResponse); }
/// <summary> /// Verify the SendItemResponseType structure. /// </summary> /// <param name="sendItemResponse">A SendItemResponseType instance.</param> /// <param name="isSchemaValidated">Indicate whether schema is verified.</param> private void VerifySendItemResponse(SendItemResponseType sendItemResponse, bool isSchemaValidated) { Site.Assert.IsTrue(isSchemaValidated, "The schema should be validated."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCORE_R425"); // Verify MS-OXWSCORE requirement: MS-OXWSCORE_R425 Site.CaptureRequirementIfIsNotNull( sendItemResponse, 425, @"[In SendItem Operation] The following is the WSDL port type specification for the SendItem operation: <wsdl:operation name=""SendItem""> <wsdl:input message=""tns:SendItemSoapIn"" /> <wsdl:output message=""tns:SendItemSoapOut"" /> </wsdl:operation>"); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCORE_R426"); // Verify MS-OXWSCORE requirement: MS-OXWSCORE_R426 Site.CaptureRequirementIfIsNotNull( sendItemResponse, 426, @"[In SendItem Operation] The following is the WSDL binding specification for the SendItem operation: <wsdl:operation name=""SendItem""> <soap:operation soapAction=""http://schemas.microsoft.com/exchange/services/2006/messages/SendItem"" /> <wsdl:input> <soap:header message=""tns:SendItemSoapIn"" part=""Impersonation"" use=""literal""/> <soap:header message=""tns:SendItemSoapIn"" part=""MailboxCulture"" use=""literal""/> <soap:header message=""tns:SendItemSoapIn"" part=""RequestVersion"" use=""literal""/> <soap:body parts=""request"" use=""literal"" /> </wsdl:input> <wsdl:output> <soap:body parts=""SendItemResult"" use=""literal"" /> <soap:header message=""tns:SendItemSoapOut"" part=""ServerVersion"" use=""literal""/> </wsdl:output> </wsdl:operation>"); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCORE_R440"); // Verify MS-OXWSCORE requirement: MS-OXWSCORE_R440 Site.CaptureRequirementIfIsNotNull( sendItemResponse, 440, @"[In tns:SendItemSoapOut Message] [The SendItemSoapOut WSDL message is defined as:] <wsdl:message name=""SendItemSoapOut""> <wsdl:part name=""SendItemResult"" element=""tns:SendItemResponse"" /> <wsdl:part name=""ServerVersion"" element=""t:ServerVersionInfo""/> </wsdl:message>"); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCORE_R1454"); // Verify MS-OXWSCORE requirement: MS-OXWSCORE_R1454 Site.CaptureRequirementIfIsNotNull( sendItemResponse, 1454, @"[In tns:SendItemSoapOut Message] The type of SendItemResult is tns:SendItemResponse (section 3.1.4.8.2.2)."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCORE_R443"); // Verify MS-OXWSCORE requirement: MS-OXWSCORE_R443 // According to the schema, sendItemResponse is the SOAP body of a response message returned by server, // this requirement can be verified directly. Site.CaptureRequirement( 443, @"[In tns:SendItemSoapOut Message] [The part ""SendItemResult""] Specifies the SOAP body of a response message."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCORE_R1455"); // Verify MS-OXWSCORE requirement: MS-OXWSCORE_R1455 Site.CaptureRequirementIfIsNotNull( this.exchangeServiceBinding.ServerVersionInfoValue, 1455, @"[In tns:SendItemSoapOut Message] The type of ServerVersion is t:ServerVersionInfo ([MS-OXWSCDATA] section 2.2.5.10)."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCORE_R444"); // Verify MS-OXWSCORE requirement: MS-OXWSCORE_R444 // According to the schema, ServerVersion is the SOAP header that contains the server version information, // this requirement can be verified directly. Site.CaptureRequirement( 444, @"[In tns:SendItemSoapOut Message] [The part ""ServerVersion""] Specifies a SOAP header that identifies the server version for the response to a SendItem operation request."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCORE_R451"); // Verify MS-OXWSCORE requirement: MS-OXWSCORE_R451 Site.CaptureRequirementIfIsNotNull( sendItemResponse, 451, @"[In m:SendItemResponse Element] [The SendItemResponse element is defined as:] <xs:element name=""SendItemResponse"" type=""m:SendItemResponseType"" />"); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCORE_R457"); // Verify MS-OXWSCORE requirement: MS-OXWSCORE_R457 Site.CaptureRequirementIfIsNotNull( sendItemResponse, 457, @"[In m:SendItemResponseType Complex Type] [The SendItemResponseType complex type is defined as:] <xs:complexType name=""SendItemResponseType""> <xs:complexContent> <xs:extension base=""m:BaseResponseMessageType"" /> </xs:complexContent> </xs:complexType>"); // Verify the BaseResponseMessageType schema. this.VerifyBaseResponseMessageType(sendItemResponse); foreach (ResponseMessageType message in sendItemResponse.ResponseMessages.Items) { this.VerifyResponseMessageType(message); } // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCORE_R450"); // Verify MS-OXWSCORE requirement: MS-OXWSCORE_R450 // This requirement can be captured directly, since SendItemResponse is the response of a SendItem operation request. Site.CaptureRequirement( 450, @"[In m:SendItemResponse Element] The SendItemResponse element specifies a response to a SendItem operation request."); // Add the debug information Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSCORE_R447"); // Verify MS-OXWSCORE requirement: MS-OXWSCORE_R447 // This requirement can be captured directly, since SendItemResponse is the response of a SendItem operation request. Site.CaptureRequirement( 447, @"[In Elements] [The element ""SentItemResponse""] Specifies a response to a SendItem operation request."); this.VerifySendItemResponseTypeSchema(sendItemResponse); }