Exemplo n.º 1
0
        /// <summary>
        /// Gets a specific attachment from exchange by id.
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public FileAttachmentType GetAttachment(string id)
        {
            var binding = ChannelHelper.BuildChannel(hostname, username, password);
            var getAttachmentRequest = new GetAttachmentType();

            var attachmentIdArray = new RequestAttachmentIdType[1];

            attachmentIdArray[0] = new RequestAttachmentIdType {
                Id = id
            };

            getAttachmentRequest.AttachmentIds = attachmentIdArray;

            GetAttachmentResponseType getAttachmentResponse = binding.GetAttachment(getAttachmentRequest);

            if (getAttachmentResponse.ResponseMessages.Items[0].ResponseClass == ResponseClassType.Error)
            {
                throw new Exception(getAttachmentResponse.ResponseMessages.Items[0].MessageText);
            }

            var attachmentResponseMessage =
                (AttachmentInfoResponseMessageType)getAttachmentResponse.ResponseMessages.Items[0];

            if (attachmentResponseMessage.Attachments == null || attachmentResponseMessage.Attachments.Length == 0)
            {
                throw new ApplicationException("Error in GetAttachment, empty AttachmentInfoResponseMessageType");
            }

            return((FileAttachmentType)attachmentResponseMessage.Attachments[0]);
        }
        /// <summary>
        /// Gets an attachment from an item in the server store.
        /// </summary>
        /// <param name="getAttachmentRequest">A GetAttachmentType complex type specifies a request message to get attached items and files on an item in the server database.</param>
        /// <returns>A GetAttachmentResponseType complex type specifies the response message that is returned by the GetAttachment operation.</returns>
        public GetAttachmentResponseType GetAttachment(GetAttachmentType getAttachmentRequest)
        {
            GetAttachmentResponseType getAttachmentResponse = this.exchangeServiceBinding.GetAttachment(getAttachmentRequest);

            Site.Assert.IsNotNull(getAttachmentResponse, "If the operation is successful, the response should not be null.");

            this.VerifySoapVersion();
            this.VerifyTransportType();
            this.VerifyServerVersionInfo(this.exchangeServiceBinding.IsSchemaValidated);
            this.VerifyGetAttachmentResponse(getAttachmentResponse, this.exchangeServiceBinding.IsSchemaValidated);
            return(getAttachmentResponse);
        }
        /// <summary>
        /// Verify the GetAttachment operation response.
        /// </summary>
        /// <param name="getAttachmentResponse">A GetAttachmentResponseType instance.</param>
        private void VerifyGetAttachmentSuccessfulResponse(GetAttachmentResponseType getAttachmentResponse)
        {
            foreach (AttachmentInfoResponseMessageType getAttachmentInfoResponse in getAttachmentResponse.ResponseMessages.Items)
            {
                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R259");

                // Verify MS-OXWSATT requirement: MS-OXWSATT_R259
                Site.CaptureRequirementIfAreEqual<ResponseClassType>(
                            ResponseClassType.Success,
                            getAttachmentInfoResponse.ResponseClass,
                            259,
                            @"[In GetAttachment Operation]  If the request is successful, the GetAttachment operation returns a GetAttachmentResponse element with the ResponseClass attribute of the GetAttachmentResponseMessage element set to ""Success"". ");

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R260");

                // Verify MS-OXWSATT requirement: MS-OXWSATT_R260
                Site.CaptureRequirementIfAreEqual<ResponseCodeType>(
                            ResponseCodeType.NoError,
                            getAttachmentInfoResponse.ResponseCode,
                            260,
                            @"[In GetAttachment Operation] [A successful GetAttachment operation request returns a GetAttachmentResponse element ] The ResponseCode element of the GetAttachmentResponse element is set to ""NoError"".");
            }
        }
        /// <summary>
        /// The capture code for requirements of GetAttachment operation.
        /// </summary>
        /// <param name="getAttachmentResponse">GetAttachmentResponseType getAttachmentResponse.</param>
        /// <param name="isSchemaValidated">Indicate whether the schema is verified.</param>
        private void VerifyGetAttachmentResponse(GetAttachmentResponseType getAttachmentResponse, bool isSchemaValidated)
        {
            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R514");

            // Verify MS-OXWSATT requirement: MS-OXWSATT_R514
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                514,
                @"[In Messages] [Message name] GetAttachmentSoapOut Specifies the SOAP message that is returned by the server in response.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R534");

            // Verify MS-OXWSATT requirement: MS-OXWSATT_R534
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                534,
                @"[In Message Processing Events and Sequencing Rules][The GetAttachment operation] Retrieves existing attachments on items in the server store.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R471");

            // Verify MS-OXWSATT requirement: MS-OXWSATT_R471
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                471,
                @"[In tns:GetAttachmentSoapIn Message] [The RequestVersion part] Specifies a SOAP header that identifies the schema version for the GetAttachment operation request.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R396");

            // Verify MS-OXWSATT requirement: MS-OXWSATT_R396
            // In SchemaValidation.cs, the nodesForSoapHeader, which is the element of SOAP header, have been validated by XmlValidater(schemaListCotent, header.InnerXml).
            // Thus R396 can be captured according validate the schema.
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                396,
                @"[In tns:GetAttachmentSoapOut Message][The element of ServerVersion part is] t:ServerVersionInfo ([MS-OXWSCDATA] section 2.2.3.12).");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R395");

            // Verify MS-OXWSATT requirement: MS-OXWSATT_R395
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                395,
                @"[In tns:GetAttachmentSoapOut Message] [The element of GetAttachmentResult part is] tns:GetAttachmentResponse (section 3.1.4.3.2.2).");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R473");

            // Verify MS-OXWSATT requirement: MS-OXWSATT_R473
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                473,
                @"[In tns:GetAttachmentSoapOut Message][The GetAttachmentResult part] Specifies the SOAP body of the response to a GetAttachment operation request.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R474");

            // Verify MS-OXWSATT requirement: MS-OXWSATT_R474
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                474,
                @"[In tns:GetAttachmentSoapOut Message][The ServerVersion part] Specifies a SOAP header that identifies the server version for the response.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R517");

            // Verify MS-OXWSATT requirement: MS-OXWSATT_R517
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                517,
                @"[In Elements] [Element name] GetAttachmentResponse Specifies the response body content from a request to get an attachment.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R519");

            // Verify MS-OXWSATT requirement: MS-OXWSATT_R519
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                519,
                @"[In Complex Types] [Complex type name]GetAttachmentResponseType Specifies a response message for the GetAttachment operation.");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R327");

            // Verify MS-OXWSATT requirement: MS-OXWSATT_R327
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                327,
                @"[In GetAttachment Operation] The following is the WSDL port type specification of the operation.
                    <wsdl:operation name=""GetAttachment"">
                        <wsdl:input message=""tns:GetAttachmentSoapIn"" />
                        <wsdl:output message=""tns:GetAttachmentSoapOut"" />
                    </wsdl:operation>");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R328");

            // Verify MS-OXWSATT requirement: MS-OXWSATT_R328
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                328,
                @"[In GetAttachment Operation] The following is the WSDL binding specification of the operation.
                    <wsdl:operation name=""GetAttachment"">
                        <soap:operation soapAction=""http://schemas.microsoft.com/exchange/services/2006/messages/GetAttachment"" />
                        <wsdl:input>
                            <soap:header message=""tns:GetAttachmentSoapIn"" part=""Impersonation"" use=""literal""/>
                            <soap:header message=""tns:GetAttachmentSoapIn"" part=""MailboxCulture"" use=""literal""/>
                            <soap:header message=""tns:GetAttachmentSoapIn"" part=""RequestVersion"" use=""literal""/>
                            <soap:header message=""tns:GetAttachmentSoapIn"" part=""TimeZoneContext"" use=""literal""/>
                            <soap:body parts=""request"" use=""literal"" />
                        </wsdl:input>
                        <wsdl:output>
                            <soap:body parts=""GetAttachmentResult"" use=""literal"" />
                            <soap:header message=""tns:GetAttachmentSoapOut"" part=""ServerVersion"" use=""literal""/>
                        </wsdl:output>
                    </wsdl:operation>");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R280");

            // Verify MS-OXWSATT requirement: MS-OXWSATT_R280
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                280,
                @"[In tns:GetAttachmentSoapOut Message] The GetAttachmentSoapOut WSDL message specifies the server response to the GetAttachment operation request to get an attachment.
                    <wsdl:message name=""GetAttachmentSoapOut"">
                        <wsdl:part name=""GetAttachmentResult"" element=""tns:GetAttachmentResponse"" />
                        <wsdl:part name=""ServerVersion"" element=""t:ServerVersionInfo""/>
                    </wsdl:message>");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R330");

            // Verify MS-OXWSATT requirement: MS-OXWSATT_R330
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                330,
                @"[In GetAttachmentResponse Element] The GetAttachmentResponse element specifies the response message to a GetAttachment operation. <xs:element name=""GetAttachmentResponse""
                      type=""m:GetAttachmentResponseType""
                     />");

            // Add the debug information
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R298");

            // Verify MS-OXWSATT requirement: MS-OXWSATT_R298
            // The type of GetAttachmentResponse is GetAttachmentResponseType.
            // validateSchema has already validate the GetAttachmentResponse is not null and matches the schema.
            // Thus this requirement can be captured.
            Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                298,
                @"[In m:GetAttachmentResponseType Complex Type] The GetAttachmentResponseType complex type extends the BaseResponseMessageType complex type ([MS-OXWSCDATA] section 2.2.4.18).
 <xs:complexType name=""GetAttachmentResponseType"">
  <xs:complexContent>
    <xs:extension
      base=""m:BaseResponseMessageType""
     />
  </xs:complexContent>
</xs:complexType>");

            AttachmentInfoResponseMessageType attachmentInfo = (AttachmentInfoResponseMessageType)getAttachmentResponse.ResponseMessages.Items[0];
            if (attachmentInfo.Attachments.Length > 0)
            {
                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R52");

                // Verify MS-OXWSATT requirement: MS-OXWSATT_R52
                // Validate the type of Attachment is not an ItemType.
                Site.CaptureRequirementIfIsTrue(
                    isSchemaValidated,
                    52,
                    @"[In m:AttachmentInfoResponseMessageType Complex Type][The Attachments element] Represents an array of types based on attachments on the item.");
            }

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R5577");

            // Verify MS-OXWSATT requirement: MS-OXWSATT_R5577
            // Schema is verified in adapter, so this requirement can be captured.
            this.Site.CaptureRequirementIfIsTrue(
                isSchemaValidated,
                5577,
                @"[In m:AttachmentInfoResponseMessageType Complex Type] The ArrayOfAttachmentsType complex type is used in the response message.");

            if (attachmentInfo.Attachments.Length > 0)
            {
                if (attachmentInfo.Attachments[0].GetType() == typeof(FileAttachmentType))
                {
                    // Add the debug information
                    Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R332");

                    // Verify MS-OXWSATT requirement: MS-OXWSATT_R332
                    // Validate the type of fileAttach is FileAttachmentType.
                    Site.CaptureRequirementIfIsTrue(
                        isSchemaValidated,
                        332,
                        @"[In t:ArrayOfAttachmentsType Complex Type][The type of FileAttachment element is] t:FileAttachmentType (section 2.2.4.5).");

                    // Add the debug information
                    Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R72");

                    // Verify MS-OXWSATT requirement: MS-OXWSATT_R72
                    // Thus this requirement can be captured.
                    Site.CaptureRequirementIfIsTrue(
                        isSchemaValidated,
                        72,
                        @"[In t:FileAttachmentType Complex Type] The FileAttachmentType complex type extends the AttachmentType complex type, as specified in section 2.2.4.4.
                    <xs:complexType name=""FileAttachmentType"">
                      <xs:complexContent>
                        <xs:extension name=""FileAttachmentType""
                          base=""t:AttachmentType""
                        >
                          <xs:sequence>
                            <xs:element name=""IsContactPhoto""
                              type=""xs:boolean""
                              minOccurs=""0""
                              maxOccurs=""1""
                             />
                            <xs:element name=""Content""
                              type=""xs:base64Binary""
                              minOccurs=""0""
                              maxOccurs=""1""
                             />
                          </xs:sequence>
                        </xs:extension>
                      </xs:complexContent>
                    </xs:complexType>");
                    FileAttachmentType fileAttachment = (FileAttachmentType)attachmentInfo.Attachments[0];

                    if (fileAttachment.Content != null)
                    {
                        // Add the debug information
                        Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R347");

                        // Verify MS-OXWSATT requirement: MS-OXWSATT_R347
                        // Validate the type of Content is byte[].
                        Site.CaptureRequirementIfIsTrue(
                            isSchemaValidated,
                            347,
                            @"[In t:FileAttachmentType Complex Type][The type of Content element is] xs:base64Binary ([XMLSCHEMA2]).");
                    }

                    if (Common.IsRequirementEnabled(318005, this.Site))
                    {
                        if (fileAttachment.IsContactPhotoSpecified == true)
                        {
                            // Add the debug information
                            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R318005");

                            // Verify MS-OXWSATT requirement: MS-OXWSATT_R318005
                            this.Site.CaptureRequirementIfIsTrue(
                                isSchemaValidated,
                                318005,
                                @"[In Appendix C: Product Behavior] Implementation does suport IsContactPhoto element. (Exchange 2010 and above follow this behavior).");
                        }
                    }
                }

                AttachmentType attachment = attachmentInfo.Attachments[0];

                if (Common.IsRequirementEnabled(318011, this.Site))
                {
                    if (attachment is ReferenceAttachmentType)
                    {
                        ReferenceAttachmentType refAttach = attachment as ReferenceAttachmentType;
                        this.verifyReferenceAttachmentType(isSchemaValidated, refAttach);

                        // Add the debug information
                        Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R318011");

                        // Verify MS-OXWSATT requirement: MS-OXWSATT_R318011
                        this.Site.CaptureRequirementIfIsTrue(
                            isSchemaValidated,
                            318011,
                            @"[In Appendix C: Product Behavior] Implementation does introduce the ReferenceAttachmentType complex type. (This type was introduced in Microsoft Exchange Server 2013 Service Pack 1 (SP1).)");
                    }
                }
                if (attachment is ItemAttachmentType)
                {
                    ItemAttachmentType itemAttachment = attachment as ItemAttachmentType;
                    if (Common.IsRequirementEnabled(318009, this.Site))
                    {
                        if (itemAttachment.Item is AbchPersonItemType)
                        {
                            // Add the debug information
                            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R318009");

                            // Verify MS-OXWSATT requirement: MS-OXWSATT_R318009
                            this.Site.CaptureRequirementIfIsTrue(
                                isSchemaValidated,
                                318009,
                                @"[In Appendix C: Product Behavior] Implementation does support the Person element. (Exchange 2016 follow this behavior).");

                            // Add the debug information
                            Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R99005");

                            // Verify MS-OXWSATT requirement: MS-OXWSATT_R99005
                            this.Site.CaptureRequirementIfIsTrue(
                                isSchemaValidated,
                                99005,
                                @"[In t:ItemAttachmentType Complex Type] [The type of Person element is] t:AbchPersonItemType ([MS-OXWSCONT] section 2.2.4.1)");
                        }
                    }
                }

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R55");

                // Verify MS-OXWSATT requirement: MS-OXWSATT_R55
                Site.CaptureRequirementIfIsTrue(
                    isSchemaValidated,
                    55,
                    @"[In t:AttachmentType Complex Type] The AttachmentType complex type represents an attachment.
                    <xs:complexType name=""AttachmentType"">
                        <xs:sequence>
                        <xs:element name=""AttachmentId""
                            type=""t:AttachmentIdType""
                            minOccurs=""0""
                            maxOccurs=""1""
                            />
                        <xs:element name=""Name""
                            type=""xs:string""
                            minOccurs=""0""
                            maxOccurs=""1""
                            />
                        <xs:element name=""ContentType""
                            type=""xs:string""
                            minOccurs=""0""
                            maxOccurs=""1""
                            />
                        <xs:element name=""ContentId""
                            type=""xs:string""
                            minOccurs=""0""
                            maxOccurs=""1""
                            />
                        <xs:element name=""ContentLocation""
                            type=""xs:string""
                            minOccurs=""0""
                            maxOccurs=""1""
                            />
                        <xs:element name=""Size""
                            type=""xs:int""
                            minOccurs=""0""
                            maxOccurs=""1""
                            />
                        <xs:element name=""LastModifiedTime""
                            type=""xs:dateTime""
                            minOccurs=""0""
                            maxOccurs=""1""
                            />
                        <xs:element name=""IsInline""
                            type=""xs:boolean""
                            minOccurs=""0""
                            maxOccurs=""1""
                            />
                        </xs:sequence>
                    </xs:complexType>");

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R336");

                // Verify MS-OXWSATT requirement: MS-OXWSATT_R336
                Site.CaptureRequirementIfIsTrue(
                    isSchemaValidated,
                    336,
                    @"[In t:AttachmentType Complex Type][The type of AttachmentId element is] t:AttachmentIdType (section 2.2.4.2).");

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R41");

                // Verify MS-OXWSATT requirement: MS-OXWSATT_R41
                Site.CaptureRequirementIfIsTrue(
                    isSchemaValidated,
                    41,
                    @"[In t:AttachmentIdType Complex Type] [the schema of ""AttachmentIdType"" is:]
                    <xs:complexType name=""AttachmentIdType"">
                      <xs:complexContent>
                        <xs:extension
                          base=""t:RequestAttachmentIdType""
                        >
                          <xs:attribute name=""RootItemId""
                            type=""xs:string""
                            use=""optional""
                           />
                          <xs:attribute name=""RootItemChangeKey""
                            type=""xs:string""
                            use=""optional""
                           />
                        </xs:extension>
                      </xs:complexContent>
                    </xs:complexType>");

                if (attachment.Name != null)
                {
                    // Add the debug information
                    Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R337");

                    // Verify MS-OXWSATT requirement: MS-OXWSATT_R337
                    Site.CaptureRequirementIfIsTrue(
                        isSchemaValidated,
                        337,
                        @"[In t:AttachmentType Complex Type][The type of Name element is] xs:string([XMLSCHEMA2]).");
                }

                if (attachment.ContentType != null)
                {
                    // Add the debug information
                    Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R338");

                    // Verify MS-OXWSATT requirement: MS-OXWSATT_R338
                    Site.CaptureRequirementIfIsTrue(
                        isSchemaValidated,
                        338,
                        @"[In t:AttachmentType Complex Type][The type of ContentType element is] xs:string.");
                }

                if (attachment.ContentId != null)
                {
                    // Add the debug information
                    Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R339");

                    // Verify MS-OXWSATT requirement: MS-OXWSATT_R339
                    Site.CaptureRequirementIfIsTrue(
                        isSchemaValidated,
                        339,
                        @"[In t:AttachmentType Complex Type][The type of ContentId element is] xs:string.");
                }

                if (attachment.ContentLocation != null)
                {
                    // Add the debug information
                    Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R340");

                    // Verify MS-OXWSATT requirement: MS-OXWSATT_R340
                    Site.CaptureRequirementIfIsTrue(
                        isSchemaValidated,
                        340,
                        @"[In t:AttachmentType Complex Type][The type of ContentLocation element is] xs:string.");
                }

                if (attachment.LastModifiedTime != null)
                {
                    // Add the debug information
                    Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R342");

                    // Verify MS-OXWSATT requirement: MS-OXWSATT_R342
                    Site.CaptureRequirementIfIsTrue(
                        isSchemaValidated,
                        342,
                        @"[In t:AttachmentType Complex Type][The type of LastModifiedTime element is] xs:dateTime ([XMLSCHEMA2]).");
                }

                if (Common.IsRequirementEnabled(318003, this.Site))
                {
                    if (attachment.IsInlineSpecified == true)
                    {
                        // Add the debug information
                        Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R318003");

                        // Verify MS-OXWSATT requirement: MS-OXWSATT_R318003
                        this.Site.CaptureRequirementIfIsTrue(
                            isSchemaValidated,
                            318003,
                            @"[In Appendix C: Product Behavior] Implementation does suport IsInline element. (Exchange 2010 and above follow this behavior).");
                    }
                }

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R49");

                // Verify MS-OXWSATT requirement: MS-OXWSATT_R49
                // The elements and their types have been verified in MS-OXWSATT_R335.
                // Thus this requirement can be captured.
                Site.CaptureRequirementIfIsTrue(
                    isSchemaValidated,
                    49,
                    @"[In m:AttachmentInfoResponseMessageType Complex Type] The AttachmentInfoResponseMessageType complex type extends the ResponseMessageType complex type, ([MS-OXWSCDATA] section 2.2.4.67).
<xs:complexType name=""AttachmentInfoResponseMessageType"">
  <xs:complexContent>
    <xs:extension
      base=""m:ResponseMessageType""
    >
      <xs:sequence>
        <xs:element name=""Attachments""
          type=""t:ArrayOfAttachmentsType""
         />
      </xs:sequence>
    </xs:extension>
  </xs:complexContent>
</xs:complexType>");

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R335");

                // Verify MS-OXWSATT requirement: MS-OXWSATT_R335
                Site.CaptureRequirementIfIsTrue(
                    isSchemaValidated,
                    335,
                    @"[In m:AttachmentInfoResponseMessageType Complex Type][The type of Attachments element is]  t:ArrayOfAttachmentsType (section 2.2.4.1).");

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R441");

                // Verify MS-OXWSATT requirement: MS-OXWSATT_R441
                // If rspMessage.Attachments[0] is not null, and ArrayOfAttachmentsType is the type of Attachments,
                // that means ArrayOfAttachmentsType is used in response.
                // Thus this requirement can be captured.
                Site.CaptureRequirementIfIsTrue(
                    isSchemaValidated,
                    441,
                    @"[In t:ArrayOfAttachmentsType Complex Type] The ArrayOfAttachmentsType complex type is used in the response message.");

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R33");

                // Verify MS-OXWSATT requirement: MS-OXWSATT_R33
                // validateSchema has already validate the GetAttachmentResponse is not null and matches the schema.
                // The elements and their types have been verified in MS-OXWSATT_R331 and MS-OXWSATT_R332.
                // Thus this requirement can be captured.
                Site.CaptureRequirementIfIsTrue(
                    isSchemaValidated,
                    33,
                    @"[In t:ArrayOfAttachmentsType Complex Type][The ArrayOfAttachmentsType Complex Type is defined as follow:]
                        <xs:complexType name=""ArrayOfAttachmentsType"">
                          <xs:choice
                            minOccurs=""0""
                            maxOccurs=""unbounded""
                          >
                            <xs:element name=""ItemAttachment""
                              type=""t:ItemAttachmentType""
                             />
                            <xs:element name=""FileAttachment""
                              type=""t:FileAttachmentType""
                             />
                            <xs:element name=""ReferenceAttachment"" 
                               type=""t:ReferenceAttachmentType""
                        />
                          </xs:choice>
                        </xs:complexType>");

                // Add the debug information
                Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R331");

                // Verify MS-OXWSATT requirement: MS-OXWSATT_R331
                Site.CaptureRequirementIfIsTrue(
                    isSchemaValidated,
                    331,
                    @"[In t:ArrayOfAttachmentsType Complex Type][The type of ItemAttachment element is] t:ItemAttachmentType (section 2.2.4.6).");

                // Add the debug information
                this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXWSATT_R79");

                // Verify MS-OXWSATT requirement: MS-OXWSATT_R79
                this.Site.CaptureRequirementIfIsTrue(
                    isSchemaValidated,
                    79,
                    @"[In t:ItemAttachmentType Complex Type][The ItemAttachmentType is defined as follow:] <xs:complexType name=""ItemAttachmentType"">
  <xs:complexContent>
    <xs:extension
      base=""t:AttachmentType""
    >
      <xs:choice
        minOccurs=""0""
        maxOccurs=""1""
      >
        <xs:element name=""Item""
          type=""t:ItemType""
         />
        <xs:element name=""Message""
          type=""t:MessageType""
         />
        <xs:element name=""CalendarItem""
          type=""t:CalendarItemType""
         />
        <xs:element name=""Contact""
          type=""t:ContactItemType""
         />
        <xs:element name=""MeetingMessage""
          type=""t:MeetingMessageType""
         />
        <xs:element name=""MeetingRequest""
          type=""t:MeetingRequestMessageType""
         />
        <xs:element name=""MeetingResponse""
          type=""t:MeetingResponseMessageType""
         />
        <xs:element name=""MeetingCancellation""
          type=""t:MeetingCancellationMessageType""
         />
        <xs:element name=""Task""
          type=""t:TaskType""
         />
        <xs:element name=""PostItem""
          type=""t:PostItemType""
         />
        <xs:element name=""RoleMember"" 
           type=""t:RoleMemberItemType""
          />
         <xs:element name=""Network"" 
           type=""t:NetworkItemType""
          />
         <xs:element name=""Person"" 
           type=""t:AbchPersonItemType""
          />
         <xs:element name=""Booking""
           type=""t:BookingItemType""
          />
      </xs:choice>
    </xs:extension>
  </xs:complexContent>
</xs:complexType>");
            }
        }