/// <summary>
        /// This operation is used to update a list view for a specified list, including display properties in CAML and HTML.
        /// </summary>
        /// <param name="listName">Specify a list on the server.</param>
        /// <param name="viewName">Specify a list view on the server.</param>
        /// <param name="viewProperties">Specify the properties of a list view on the server.</param>
        /// <param name="toolbar">Specify the rendering of the toolbar of a list.</param>
        /// <param name="viewHeader">Specify the rendering of the header, or the top of a list view page.</param>
        /// <param name="viewBody">Specify the rendering of the main, or the middle portion of a list view page.</param>
        /// <param name="viewFooter">Specify the rendering of the footer, or the bottom of a list view page.</param>
        /// <param name="viewEmpty">Specify the message to be displayed when no items are in a list view.</param>
        /// <param name="rowLimitExceeded">Specify rendering of additional items when the number of items exceeds the value.</param>
        /// <param name="query">Include the information that affects how a list view displays the data.</param>
        /// <param name="viewFields">Specify the fields included in a list view.</param>
        /// <param name="aggregations">The type of the aggregation.</param>
        /// <param name="formats">Specify the row and column formatting of a list view.</param>
        /// <param name="rowLimit">Specify whether a list supports displaying items page-by-page, and the count of items a list view displays per page.</param>
        /// <returns>The result returns a View that the type is ViewDefinition if the operation succeeds</returns>
        public UpdateViewHtmlResponseUpdateViewHtmlResult UpdateViewHtml(
            string listName,
            string viewName,
            UpdateViewHtmlViewProperties viewProperties,
            UpdateViewHtmlToolbar toolbar,
            UpdateViewHtmlViewHeader viewHeader,
            UpdateViewHtmlViewBody viewBody,
            UpdateViewHtmlViewFooter viewFooter,
            UpdateViewHtmlViewEmpty viewEmpty,
            UpdateViewHtmlRowLimitExceeded rowLimitExceeded,
            UpdateViewHtmlQuery query,
            UpdateViewHtmlViewFields viewFields,
            UpdateViewHtmlAggregations aggregations,
            UpdateViewHtmlFormats formats,
            UpdateViewHtmlRowLimit rowLimit)
        {
            UpdateViewHtmlResponseUpdateViewHtmlResult updateViewHtmlResult;

            try
            {
                updateViewHtmlResult = this.viewssProxy.UpdateViewHtml(
                    listName,
                    viewName,
                    viewProperties,
                    toolbar,
                    viewHeader,
                    viewBody,
                    viewFooter,
                    viewEmpty,
                    rowLimitExceeded,
                    query,
                    viewFields,
                    aggregations,
                    formats,
                    rowLimit);

                // Used to validate the transport requirements.
                this.CaptureTransportRelatedRequirements();

                // Used to validate the UpdateViewHtml schema requirements.
                this.ValidateUpdateViewHtmlResult(updateViewHtmlResult);
            }
            catch (SoapException soapException)
            {
                this.Site.Log.Add(
                    LogEntryKind.Debug,
                    @"There is an exception generated when calling [UpdateViewHtml] method:\r\n{0}",
                    soapException.Detail.InnerXml);

                // Used to validate the transport requirements.
                this.CaptureTransportRelatedRequirements();

                // Used to validate the schema of SoapFault.
                this.ValidateSOAPFaultDetails(soapException.Detail);

                throw;
            }

            return(updateViewHtmlResult);
        }
        /// <summary>
        /// A method to get all the HTML and CAML configure elements from the configure file ViewHtmlConfigure.xml
        /// for the UpdateViewHtml operation.
        /// </summary>
        /// <param name="toolBar">The outer UpdateViewHtmlToolbar instance.</param>
        /// <param name="viewHeader">The outer UpdateViewHtmlViewHeader instance.</param>
        /// <param name="viewBody">The outer UpdateViewHtmlViewBody instance.</param>
        /// <param name="viewFooter">The outer UpdateViewHtmlViewFooter instance.</param>
        /// <param name="viewEmpty">The outer UpdateViewHtmlViewEmpty instance.</param>
        /// <param name="rowLimitExceeded">The outer UpdateViewHtmlRowLimitExceeded instance.</param>
        protected void GetHtmlConfigure(
            out UpdateViewHtmlToolbar toolBar,
            out UpdateViewHtmlViewHeader viewHeader,
            out UpdateViewHtmlViewBody viewBody,
            out UpdateViewHtmlViewFooter viewFooter,
            out UpdateViewHtmlViewEmpty viewEmpty,
            out UpdateViewHtmlRowLimitExceeded rowLimitExceeded)
        {
            toolBar          = new UpdateViewHtmlToolbar();
            viewHeader       = new UpdateViewHtmlViewHeader();
            viewBody         = new UpdateViewHtmlViewBody();
            viewFooter       = new UpdateViewHtmlViewFooter();
            viewEmpty        = new UpdateViewHtmlViewEmpty();
            rowLimitExceeded = new UpdateViewHtmlRowLimitExceeded();

            bool fileExisted = File.Exists("ViewHtmlConfigure.xml");

            this.Site.Assume.IsTrue(fileExisted, "The file \"ViewHtmlConfigure.xml\" should exist in current path.");

            // If the view HTML configure file exists, get the HTML or CAML content from the configuration.
            if (fileExisted)
            {
                toolBar.Toolbar                   = new ToolbarDefinition();
                viewHeader.ViewHeader             = new UpdateViewHtmlViewHeaderViewHeader();
                viewBody.ViewBody                 = new UpdateViewHtmlViewBodyViewBody();
                viewFooter.ViewFooter             = new UpdateViewHtmlViewFooterViewFooter();
                viewEmpty.ViewEmpty               = new UpdateViewHtmlViewEmptyViewEmpty();
                rowLimitExceeded.RowLimitExceeded = new UpdateViewHtmlRowLimitExceededRowLimitExceeded();

                // Load the ViewHtmlConfigure.xml into XmlDocument.
                XmlDocument doc = new XmlDocument();
                doc.Load("ViewHtmlConfigure.xml");

                // Get all the configured HTML or CAML elements.
                toolBar.Toolbar.Any                   = this.GetConfiguredElements("Toolbar", doc);
                viewHeader.ViewHeader.Any             = this.GetConfiguredElements("ViewHeader", doc);
                viewBody.ViewBody.Any                 = this.GetConfiguredElements("ViewBody", doc);
                viewFooter.ViewFooter.Any             = this.GetConfiguredElements("ViewFooter", doc);
                viewEmpty.ViewEmpty.Any               = this.GetConfiguredElements("ViewEmpty", doc);
                rowLimitExceeded.RowLimitExceeded.Any = this.GetConfiguredElements("RowLimitExceeded", doc);
            }
        }
        /// <summary>
        /// A method to get all the HTML and CAML configure elements from the configure file ViewHtmlConfigure.xml 
        /// for the UpdateViewHtml operation.
        /// </summary>
        /// <param name="toolBar">The outer UpdateViewHtmlToolbar instance.</param>
        /// <param name="viewHeader">The outer UpdateViewHtmlViewHeader instance.</param>
        /// <param name="viewBody">The outer UpdateViewHtmlViewBody instance.</param>
        /// <param name="viewFooter">The outer UpdateViewHtmlViewFooter instance.</param>
        /// <param name="viewEmpty">The outer UpdateViewHtmlViewEmpty instance.</param>
        /// <param name="rowLimitExceeded">The outer UpdateViewHtmlRowLimitExceeded instance.</param>
        protected void GetHtmlConfigure(
                                    out UpdateViewHtmlToolbar toolBar,
                                    out UpdateViewHtmlViewHeader viewHeader,
                                    out UpdateViewHtmlViewBody viewBody,
                                    out UpdateViewHtmlViewFooter viewFooter,
                                    out UpdateViewHtmlViewEmpty viewEmpty,
                                    out UpdateViewHtmlRowLimitExceeded rowLimitExceeded)
        {
            toolBar = new UpdateViewHtmlToolbar();
            viewHeader = new UpdateViewHtmlViewHeader();
            viewBody = new UpdateViewHtmlViewBody();
            viewFooter = new UpdateViewHtmlViewFooter();
            viewEmpty = new UpdateViewHtmlViewEmpty();
            rowLimitExceeded = new UpdateViewHtmlRowLimitExceeded();

            bool fileExisted = File.Exists("ViewHtmlConfigure.xml");
            this.Site.Assume.IsTrue(fileExisted, "The file \"ViewHtmlConfigure.xml\" should exist in current path.");

            // If the view HTML configure file exists, get the HTML or CAML content from the configuration.
            if (fileExisted)
            {
                toolBar.Toolbar = new ToolbarDefinition();
                viewHeader.ViewHeader = new UpdateViewHtmlViewHeaderViewHeader();
                viewBody.ViewBody = new UpdateViewHtmlViewBodyViewBody();
                viewFooter.ViewFooter = new UpdateViewHtmlViewFooterViewFooter();
                viewEmpty.ViewEmpty = new UpdateViewHtmlViewEmptyViewEmpty();
                rowLimitExceeded.RowLimitExceeded = new UpdateViewHtmlRowLimitExceededRowLimitExceeded();

                // Load the ViewHtmlConfigure.xml into XmlDocument.
                XmlDocument doc = new XmlDocument();
                doc.Load("ViewHtmlConfigure.xml");

                // Get all the configured HTML or CAML elements.
                toolBar.Toolbar.Any = this.GetConfiguredElements("Toolbar", doc);
                viewHeader.ViewHeader.Any = this.GetConfiguredElements("ViewHeader", doc);
                viewBody.ViewBody.Any = this.GetConfiguredElements("ViewBody", doc);
                viewFooter.ViewFooter.Any = this.GetConfiguredElements("ViewFooter", doc);
                viewEmpty.ViewEmpty.Any = this.GetConfiguredElements("ViewEmpty", doc);
                rowLimitExceeded.RowLimitExceeded.Any = this.GetConfiguredElements("RowLimitExceeded", doc);
            }
        }
        /// <summary>
        /// This operation is used to update a list view for a specified list, including display properties in CAML and HTML.
        /// </summary>
        /// <param name="listName">Specify a list on the server.</param>
        /// <param name="viewName">Specify a list view on the server.</param>
        /// <param name="viewProperties">Specify the properties of a list view on the server.</param>
        /// <param name="toolbar">Specify the rendering of the toolbar of a list.</param>
        /// <param name="viewHeader">Specify the rendering of the header, or the top of a list view page.</param>
        /// <param name="viewBody">Specify the rendering of the main, or the middle portion of a list view page.</param>
        /// <param name="viewFooter">Specify the rendering of the footer, or the bottom of a list view page.</param>
        /// <param name="viewEmpty">Specify the message to be displayed when no items are in a list view.</param>
        /// <param name="rowLimitExceeded">Specify rendering of additional items when the number of items exceeds the value.</param>
        /// <param name="query">Include the information that affects how a list view displays the data.</param>
        /// <param name="viewFields">Specify the fields included in a list view.</param>
        /// <param name="aggregations">The type of the aggregation.</param> 
        /// <param name="formats">Specify the row and column formatting of a list view.</param>
        /// <param name="rowLimit">Specify whether a list supports displaying items page-by-page, and the count of items a list view displays per page.</param>
        /// <returns>The result returns a View that the type is ViewDefinition if the operation succeeds</returns>
        public UpdateViewHtmlResponseUpdateViewHtmlResult UpdateViewHtml(
            string listName,
            string viewName,
            UpdateViewHtmlViewProperties viewProperties,
            UpdateViewHtmlToolbar toolbar,
            UpdateViewHtmlViewHeader viewHeader,
            UpdateViewHtmlViewBody viewBody,
            UpdateViewHtmlViewFooter viewFooter,
            UpdateViewHtmlViewEmpty viewEmpty,
            UpdateViewHtmlRowLimitExceeded rowLimitExceeded,
            UpdateViewHtmlQuery query,
            UpdateViewHtmlViewFields viewFields,
            UpdateViewHtmlAggregations aggregations,
            UpdateViewHtmlFormats formats,
            UpdateViewHtmlRowLimit rowLimit)
        {
            UpdateViewHtmlResponseUpdateViewHtmlResult updateViewHtmlResult;

            try 
            {
                updateViewHtmlResult = this.viewssProxy.UpdateViewHtml(
                listName,
                viewName,
                viewProperties,
                toolbar,
                viewHeader,
                viewBody,
                viewFooter,
                viewEmpty,
                rowLimitExceeded,
                query,
                viewFields,
                aggregations,
                formats,
                rowLimit);

                // Used to validate the transport requirements.
                this.CaptureTransportRelatedRequirements();

                // Used to validate the UpdateViewHtml schema requirements.
                this.ValidateUpdateViewHtmlResult(updateViewHtmlResult);
            }
            catch (SoapException soapException)
            {
                this.Site.Log.Add(
                                LogEntryKind.Debug,
                                @"There is an exception generated when calling [UpdateViewHtml] method:\r\n{0}",
                                soapException.Detail.InnerXml);

                // Used to validate the transport requirements.
                this.CaptureTransportRelatedRequirements();

                // Used to validate the schema of SoapFault.
                this.ValidateSOAPFaultDetails(soapException.Detail);

                throw;
            }

            return updateViewHtmlResult;
        }