A class indicates the NotificationWait request type success response body.
Inheritance: Microsoft.Protocols.TestSuites.Common.MailboxResponseBodyBase
        /// <summary>
        /// Parse the NotificationWait request type success response body.
        /// </summary>
        /// <param name="rawData">The raw data which is returned by server.</param>
        /// <returns>An instance of NotificationWaitSuccessResponseBody class.</returns>
        public static NotificationWaitSuccessResponseBody Parse(byte[] rawData)
        {
            NotificationWaitSuccessResponseBody responseBody = new NotificationWaitSuccessResponseBody();
            int index = 0;
            responseBody.StatusCode = BitConverter.ToUInt32(rawData, index);
            index += 4;
            responseBody.ErrorCode = BitConverter.ToUInt32(rawData, index);
            index += 4;
            responseBody.EventPending = BitConverter.ToUInt32(rawData, index);
            index += 4;
            responseBody.AuxiliaryBufferSize = BitConverter.ToUInt32(rawData, index);
            index += 4;
            responseBody.AuxiliaryBuffer = new byte[responseBody.AuxiliaryBufferSize];
            Array.Copy(rawData, index, responseBody.AuxiliaryBuffer, 0, responseBody.AuxiliaryBufferSize);

            return responseBody;
        }
Esempio n. 2
0
        /// <summary>
        /// Parse the NotificationWait request type success response body.
        /// </summary>
        /// <param name="rawData">The raw data which is returned by server.</param>
        /// <returns>An instance of NotificationWaitSuccessResponseBody class.</returns>
        public static NotificationWaitSuccessResponseBody Parse(byte[] rawData)
        {
            NotificationWaitSuccessResponseBody responseBody = new NotificationWaitSuccessResponseBody();
            int index = 0;

            responseBody.StatusCode = BitConverter.ToUInt32(rawData, index);
            index += 4;
            responseBody.ErrorCode = BitConverter.ToUInt32(rawData, index);
            index += 4;
            responseBody.EventPending = BitConverter.ToUInt32(rawData, index);
            index += 4;
            responseBody.AuxiliaryBufferSize = BitConverter.ToUInt32(rawData, index);
            index += 4;
            responseBody.AuxiliaryBuffer = new byte[responseBody.AuxiliaryBufferSize];
            Array.Copy(rawData, index, responseBody.AuxiliaryBuffer, 0, responseBody.AuxiliaryBufferSize);

            return(responseBody);
        }
        /// <summary>
        /// This method is used by the client to request that the server notify the client when a processing request that takes an extended amount of time completes.
        /// </summary>
        /// <param name="notificationWaitRequestBody">The request body of the NotificationWait request type.</param>
        /// <param name="httpHeaders">The request and response header of the NotificationWait request type.</param>
        /// <param name="responseBody">The response body of the NotificationWait request type.</param>
        /// <param name="metatags">The meta tags of the NotificationWait request type.</param>
        /// <param name="additionalHeader">The additional headers in the Notification request type response.</param>
        /// <returns>The status code of the NotificationWait request type.</returns>
        public uint NotificationWait(NotificationWaitRequestBody notificationWaitRequestBody, ref WebHeaderCollection httpHeaders, out MailboxResponseBodyBase responseBody, out List <string> metatags, out Dictionary <string, string> additionalHeader)
        {
            responseBody = null;
            byte[] rawBuffer;

            // Send the NotificationWait HTTP request and get the response.
            HttpWebResponse response = this.SendMAPIHttpRequest(this.userName, this.password, notificationWaitRequestBody, ServerEndpoint.MailboxServerEndpoint, AdapterHelper.SessionContextCookies, httpHeaders, out rawBuffer);

            httpHeaders = response.Headers;
            uint responseCode = AdapterHelper.GetFinalResponseCode(response.Headers["X-ResponseCode"]);

            // Read the HTTP response buffer and parse the response to correct format.
            CommonResponse commonResponse = CommonResponse.ParseCommonResponse(rawBuffer);

            metatags         = commonResponse.MetaTags;
            additionalHeader = commonResponse.AdditionalHeaders;
            if (responseCode == 0)
            {
                Site.Assert.IsNotNull(commonResponse.ResponseBodyRawData, "The response body should contains data.");
                uint statusCode = BitConverter.ToUInt32(commonResponse.ResponseBodyRawData, 0);
                if (statusCode == 0)
                {
                    // Send the NotificationWait request succeeded when the StatusCode field equals zero.
                    NotificationWaitSuccessResponseBody responseSuccess = NotificationWaitSuccessResponseBody.Parse(commonResponse.ResponseBodyRawData);
                    responseBody = responseSuccess;

                    this.VerifyNotificationWaitSuccessResponseBody(responseSuccess);
                }

                this.VerifyHTTPS(response);
                this.VerifyAuthentication(response);
                this.VerifyAutoDiscover(response.StatusCode, ServerEndpoint.MailboxServerEndpoint);
                this.VerifyHTTPHeaders(response.Headers);
                this.VerifyAdditionalHeaders(commonResponse.AdditionalHeaders);
                this.VerifyRequestTypesForMailboxServerEndpoint(response.Headers, commonResponse);
                this.VerifyResponseMetaTags(commonResponse.MetaTags);
                this.VerifyNotificationWaitRequestType(response.Headers);
            }

            this.VerifyContentTypeHeader(response.Headers);
            this.VerifyRespondingToAllRequestTypeRequests(response, commonResponse, responseCode);
            response.GetResponseStream().Close();
            return(responseCode);
        }
        /// <summary>
        /// Verify the NotificationWait success response body related requirements.
        /// </summary>
        /// <param name="notificationWaitSuccessResponseBody">The NotificationWaitSuccessResponseBody to be verified.</param>
        private void VerifyNotificationWaitSuccessResponseBody(NotificationWaitSuccessResponseBody notificationWaitSuccessResponseBody)
        {
            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R283");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R283
            this.Site.CaptureRequirementIfIsInstanceOfType(
                notificationWaitSuccessResponseBody.StatusCode,
                typeof(uint),
                283,
                @"[In NotificationWait Request Type Success Response Body] StatusCode (4 bytes): An unsigned integer that specifies the status of the request.");

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1369
            this.Site.CaptureRequirementIfAreEqual<uint>(
                0,
                notificationWaitSuccessResponseBody.StatusCode,
                1369,
                @"[In NotificationWait Request Type Success Response Body] [StatusCode] This field MUST be set to 0x00000000.");

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R297
            this.Site.CaptureRequirementIfIsInstanceOfType(
                notificationWaitSuccessResponseBody.ErrorCode,
                typeof(uint),
                297,
                @"[In NotificationWait Request Type Success Response Body] ErrorCode (4 bytes): An unsigned integer that specifies the return status of the operation.");

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R285
            this.Site.CaptureRequirementIfIsInstanceOfType(
                notificationWaitSuccessResponseBody.EventPending,
                typeof(uint),
                285,
                @"[In NotificationWait Request Type Success Response Body] EventPending (4 bytes): An unsigned integer that indicates whether an event is pending.");

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1373
            this.Site.CaptureRequirementIfIsInstanceOfType(
                notificationWaitSuccessResponseBody.AuxiliaryBufferSize,
                typeof(uint),
                1373,
                @"[In NotificationWait Request Type Success Response Body] AuxiliaryBufferSize (4 bytes): An unsigned integer that specifies the size, in bytes, of the AuxiliaryBuffer field.");

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R298
            this.Site.CaptureRequirementIfIsInstanceOfType(
                notificationWaitSuccessResponseBody.AuxiliaryBuffer,
                typeof(byte[]),
                298,
                @"[In NotificationWait Request Type Success Response Body] AuxiliaryBuffer (variable): An array of bytes that constitute the auxiliary payload data returned from the server.");

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1374
            this.Site.CaptureRequirementIfAreEqual<uint>(
                notificationWaitSuccessResponseBody.AuxiliaryBufferSize,
                (uint)notificationWaitSuccessResponseBody.AuxiliaryBuffer.Length,
                1374,
                @"[In NotificationWait Request Type Success Response Body] [AuxiliaryBuffer] The size of this field, in bytes, is specified by the AuxiliaryBufferSize field.");
        }
        public void MSOXCMAPIHTTP_S01_TC10_NotificationWaitWithoutPendingEvent()
        {
            this.CheckMapiHttpIsSupported();
            WebHeaderCollection headers = new WebHeaderCollection();

            #region Send a valid Connect request type to establish a Session Context with the server.
            ConnectSuccessResponseBody connectResponse = this.ConnectToServer(out headers);
            Site.Assert.AreEqual<uint>(0, connectResponse.StatusCode, "The server should return a Status 0 in X-ResponseCode header if client connect to server succeeded.");
            #endregion

            #region Send an Execute request that includes Logon ROP to server.
            WebHeaderCollection executeHeaders = AdapterHelper.InitializeHTTPHeader(RequestType.Execute, AdapterHelper.ClientInstance, AdapterHelper.Counter);

            ExecuteRequestBody requestBody = this.InitializeExecuteRequestBody(this.GetRopLogonRequest());
            List<string> metaTags = new List<string>();

            ExecuteSuccessResponseBody executeSuccessResponse = this.SendExecuteRequest(requestBody, ref executeHeaders, out metaTags) as ExecuteSuccessResponseBody;
            #region Capture code
            string pendingPeriodHeader = executeHeaders["X-PendingPeriod"];

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1182
            this.Site.CaptureRequirementIfIsFalse(
                string.IsNullOrEmpty(pendingPeriodHeader),
                1182,
                @"[In Handling a Chunked Response] The immediate response includes an X-PendingPeriod header, specified in section 2.2.3.3.5, to tell the client the number of milliseconds to be expected between keep-alive PENDING meta-tags in the response stream during the time a request is currently being processed on the server.");

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1183
            this.Site.CaptureRequirementIfAreEqual<string>(
                "15000",
                pendingPeriodHeader,
                1183,
                @"[In Handling a Chunked Response] The default value for the keep-alive interval is 15 seconds, until the request is done.");
            #endregion
            #endregion

            #region Call NotificationWait Request Type to get the pending event.
            NotificationWaitRequestBody notificationWaitRequestBody = this.NotificationWaitRequest();
            WebHeaderCollection notificationWaitWebHeaderCollection = AdapterHelper.InitializeHTTPHeader(RequestType.NotificationWait, AdapterHelper.ClientInstance, AdapterHelper.Counter);
            MailboxResponseBodyBase responseBody;
            Dictionary<string, string> addtionalHeaders = new Dictionary<string, string>();
            DateTime startTime = DateTime.Now;
            uint result = this.Adapter.NotificationWait(notificationWaitRequestBody, ref notificationWaitWebHeaderCollection, out responseBody, out metaTags, out addtionalHeaders);
            DateTime endTime = DateTime.Now;
            TimeSpan interval = endTime.Subtract(startTime);

            NotificationWaitSuccessResponseBody notificationWaitResponseBody = new NotificationWaitSuccessResponseBody();
            notificationWaitResponseBody = (NotificationWaitSuccessResponseBody)responseBody;
            Site.Assert.AreEqual<uint>((uint)0, notificationWaitResponseBody.StatusCode, "NotificationWait method should succeed and 0 is expected to be returned. The returned value is {0}.", notificationWaitResponseBody.StatusCode);

            #region Capture code
            bool isPendingMetaTag = false;
            for (int i = 1; i < metaTags.Count - 1; i++)
            {
                if (string.Compare(metaTags[i], "PENDING", true) == 0)
                {
                    isPendingMetaTag = true;
                }
                else
                {
                    this.Site.Log.Add(LogEntryKind.Debug, "Expect the Meta-Tag is PENDING, actually the Meta-Tag is {0}", metaTags[i]);
                    isPendingMetaTag = false;
                    break;
                }
            }

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1135
            // No pending event exists in this case, so NotificationWait needs to wait 5 minutes and the PENDING meta-tag will be returned before the DONE meta-tag is returned.
            this.Site.CaptureRequirementIfIsTrue(
                isPendingMetaTag,
                1135,
                @"[In Response Meta-Tags] PENDING: The server is processing the request.");

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1178
            // Server keeps the response alive by sending response to client including PENDING meta-tag. So if the PENDING meta-tag is included in the returned meta-tags, R1178 can be verified.
            this.Site.CaptureRequirementIfIsTrue(
                isPendingMetaTag,
                1178,
                @"[In Handling a Chunked Response] The keep-alive response contains the PENDING meta-tag.");

            // R1178 ensures that the keep-alive response includes the PENDING meta-tags, so R1241 can be verified directly.
            this.Site.CaptureRequirement(
                1241,
                @"[In Responding to All Request Type Requests] The keep-alive response includes the PENDING meta-tag, as specified in section 2.2.7.");

            // Add the debug information
            this.Site.Log.Add(
                LogEntryKind.Debug,
                "Verify MS-OXCMAPIHTTP_R1185. The first meta-tag is {0}, the meta-tag before the last one is {1}, the last one is {2}.",
                metaTags[0],
                metaTags[metaTags.Count - 2],
                metaTags[metaTags.Count - 1]);

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1185
            // Server uses the "PENDING" meta-tag to keep the transmission alive with client. So R1185 can be verified if all the three kinds of meta-tags exist.
            bool isVerifiedR1185 = metaTags[0] == "PROCESSING" && metaTags[metaTags.Count - 2] == "PENDING" && metaTags[metaTags.Count - 1] == "DONE";
            
            this.Site.CaptureRequirementIfIsTrue(
                isVerifiedR1185,
                1185,
                @"[In Handling a Chunked Response] The initial response, plus the intermediate keep-alive transmissions, and the final response body are all part of the inner response stream.");

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1372
            // No pending event is registered in this case. So MS-OXCMAPIHTTP_R1372 can be verified if the value of EventPending field is 0x00000000.
            this.Site.CaptureRequirementIfAreEqual<uint>(
                0x00000000,
                notificationWaitResponseBody.EventPending,
                1372,
                @"[In NotificationWait Request Type Success Response Body] [EventPending] The value 0x00000000 indicates that no event is pending.");

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1256
            this.Site.CaptureRequirementIfIsNotNull(
                notificationWaitResponseBody,
                1256,
                @"[In Responding to a NotificationWait Request Type Request] The server creates a NotificationWait request type response, as specified in section 2.2.2.2, including the NotificationWait request type response body as specified in section 2.2.4.4.2 if the request was successful.");

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R1259. No pending event exists on the server. The NotificationWait request type execute time is {0}.", interval.TotalMinutes);

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1259
            // Because above step does not trigger any event, so if EventPending is false and the execute time of NotificationWait is larger than 5 minutes, R1930 will be verified.
            bool isVerifiedR1259 = interval.TotalSeconds >= 300 && notificationWaitResponseBody.EventPending == 0x00000000;

            this.Site.CaptureRequirementIfIsTrue(
                isVerifiedR1259,
                1259,
                @"[In Responding to a NotificationWait Request Type Request] This response [NotificationWait request type response] is not sent until the 5-minute maximum time limit expires.");

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

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R308
            // If the response body is not null, it indicates that method NotificationWait has been completed because server will return the event details in the ROP response buffer.
            this.Site.CaptureRequirementIfIsNotNull(
                notificationWaitResponseBody,
                308,
                @"[In NotificationWait Request Type] The NotificationWait request type is used by the client to request that the server notify the client when a processing request that takes an extended amount of time completes.");
            #endregion
            #endregion

            #region Send a Disconnect request to destroy the Session Context.
            MailboxResponseBodyBase response;
            this.Adapter.Disconnect(out response);
            #endregion
        }
        public void MSOXCMAPIHTTP_S01_TC09_NotificationWaitWithPendingEvent()
        {
            this.CheckMapiHttpIsSupported();
            WebHeaderCollection headers = new WebHeaderCollection();

            #region Send a valid Connect request type to establish a Session Context with the server.
            ConnectSuccessResponseBody connectResponse = this.ConnectToServer(out headers);
            Site.Assert.AreEqual<uint>(0, connectResponse.StatusCode, "The server should return a Status 0 in X-ResponseCode header if client connect to server succeeded.");
            #endregion

            #region Send an Execute request that includes Logon ROP to server.
            WebHeaderCollection executeHeaders = AdapterHelper.InitializeHTTPHeader(RequestType.Execute, AdapterHelper.ClientInstance, AdapterHelper.Counter);

            ExecuteRequestBody requestBody = this.InitializeExecuteRequestBody(this.GetRopLogonRequest());
            List<string> metaTags = new List<string>();

            ExecuteSuccessResponseBody executeSuccessResponse = this.SendExecuteRequest(requestBody, ref executeHeaders, out metaTags) as ExecuteSuccessResponseBody;

            ulong folderId;
            RopLogonResponse logonResponse = new RopLogonResponse();
            uint logonHandle = this.ParseLogonResponse(executeSuccessResponse.RopBuffer, out folderId, out logonResponse);
            Site.Assert.AreEqual<uint>(0, logonResponse.ReturnValue, "Client logon to the server should be succeed and 0 is expected to be returned for the RopLogon. The returned value is {0}.", logonResponse.ReturnValue);

            #endregion

            #region Call RopRegisterNotification to register an event on server.
            executeHeaders = AdapterHelper.InitializeHTTPHeader(RequestType.Execute, AdapterHelper.ClientInstance, AdapterHelper.Counter);
            requestBody = this.InitializeExecuteRequestBody(this.RegisterNotificationRequest(folderId));
            metaTags = new List<string>();

            executeSuccessResponse = this.SendExecuteRequest(requestBody, ref executeHeaders, out metaTags) as ExecuteSuccessResponseBody;
            Site.Assert.AreEqual<uint>((uint)0, executeSuccessResponse.StatusCode, "Execute method should succeed.");
            #endregion

            #region Send a new mail to trigger the event.
            bool isSendSuccess = this.SUTControlAdapter.SendMailItem();
            this.Site.Assert.IsTrue(isSendSuccess, "Send a mail should successfully.");
            this.isReceiveNewMail = isSendSuccess;
            #endregion

            #region Call NotificationWait Request Type to get the pending event.
            NotificationWaitRequestBody notificationWaitRequestBody = this.NotificationWaitRequest();
            WebHeaderCollection notificationWaitWebHeaderCollection = AdapterHelper.InitializeHTTPHeader(RequestType.NotificationWait, AdapterHelper.ClientInstance, AdapterHelper.Counter);
            MailboxResponseBodyBase responseBody;
            Dictionary<string, string> addtionalHeaders = new Dictionary<string, string>();

            uint result = this.Adapter.NotificationWait(notificationWaitRequestBody, ref notificationWaitWebHeaderCollection, out responseBody, out metaTags, out addtionalHeaders);

            NotificationWaitSuccessResponseBody notificationWaitResponseBody = new NotificationWaitSuccessResponseBody();
            notificationWaitResponseBody = (NotificationWaitSuccessResponseBody)responseBody;
            Site.Assert.AreEqual<uint>((uint)0, notificationWaitResponseBody.StatusCode, "NotificationWait method should succeed and 0 is expected to be returned. The returned value is {0}.", notificationWaitResponseBody.StatusCode);

            #region Capture code
            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R1371");

            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R1371
            // A pending event is registered in step 3 and triggered in step 4, so MS-OXCMAPIHTTP_R1371 can be verified if the value of EventPending flag is 0x00000001.
            this.Site.CaptureRequirementIfAreEqual<uint>(
                0x00000001,
                notificationWaitResponseBody.EventPending,
                1371,
                @"[In NotificationWait Request Type Success Response Body] [EventPending] The value 0x00000001 indicates that an event is pending.");

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

            // The pending event is registered and triggered in the above steps, so MS-OXCMAPIHTTP_R1258 can be verified if code can reach here.
            this.Site.CaptureRequirement(
                1258,
                @"[In Responding to a NotificationWait Request Type Request] This response [NotificationWait request type response] is not sent until the current server event completes.");

            #endregion
            #endregion

            #region Call Execute Request Type with no ROP in rgbIn to get the notify information.
            executeHeaders = AdapterHelper.InitializeHTTPHeader(RequestType.Execute, AdapterHelper.ClientInstance, AdapterHelper.Counter);
            byte[] ropBuffer = this.RopBufferHelper.BuildRequestBufferWithoutRop();
            metaTags = new List<string>();

            requestBody = new ExecuteRequestBody();
            requestBody.Flags = 0x00000003;
            requestBody.RopBufferSize = (uint)ropBuffer.Length;
            requestBody.RopBuffer = ropBuffer;
            requestBody.MaxRopOut = 0x10008;
            requestBody.AuxiliaryBufferSize = 0;
            requestBody.AuxiliaryBuffer = new byte[] { };

            executeSuccessResponse = this.SendExecuteRequest(requestBody, ref executeHeaders, out metaTags) as ExecuteSuccessResponseBody;
            Site.Assert.AreEqual<uint>((uint)0, executeSuccessResponse.StatusCode, "Execute method should succeed.");

            // Add the debug information
            this.Site.Log.Add(LogEntryKind.Debug, "Verify MS-OXCMAPIHTTP_R318");
        
            // Verify MS-OXCMAPIHTTP requirement: MS-OXCMAPIHTTP_R318
            // No ROP is included in the request, so if the RopBuffer in the response is not null, it indicates that the event details are included in the Execute request type response buffer.
            this.Site.CaptureRequirementIfIsNotNull(
                executeSuccessResponse.RopBuffer,
                318,
                @"[In NotificationWait Request Type Success Response Body] [EventPending] The server will return the event details in the Execute request type response body.");
            #endregion

            #region Send a Disconnect request to destroy the Session Context.
            MailboxResponseBodyBase response;
            this.Adapter.Disconnect(out response);
            #endregion
        }