Microsoft.Protocols.TestSuites.MS_LISTSWS.MS_LISTSWSAdapter.UpdateContentTypesXmlDocument C# (CSharp) Method

UpdateContentTypesXmlDocument() public method

The UpdateContentTypesXmlDocument operation is used to update XML Document properties of the content type collection on a list.
public UpdateContentTypesXmlDocument ( string listName, UpdateContentTypesXmlDocumentNewDocument newDocument ) : UpdateContentTypesXmlDocumentResponseUpdateContentTypesXmlDocumentResult
listName string The name of the list of which some content type xml documents will be updated
newDocument UpdateContentTypesXmlDocumentNewDocument The container element for a list of content type and XML document to update
return UpdateContentTypesXmlDocumentResponseUpdateContentTypesXmlDocumentResult
        public UpdateContentTypesXmlDocumentResponseUpdateContentTypesXmlDocumentResult UpdateContentTypesXmlDocument(string listName, UpdateContentTypesXmlDocumentNewDocument newDocument)
        {
            this.Site.Assert.IsNotNull(this.listsProxy, "The Proxy instance should not be NULL. If assert failed, the adapter need to be initialized");

            UpdateContentTypesXmlDocumentResponseUpdateContentTypesXmlDocumentResult result = null;
            try
            {
                result = this.listsProxy.UpdateContentTypesXmlDocument(listName, newDocument);

                // Verify the requirements of the UpdateContentTypesXmlDocument operation.
                this.VerifyUpdateContentTypesXmlDocumentOperation(result);

                // Verify the requirements of the transport.
                this.VerifyTransportRequirements();
            }
            catch (XmlSchemaValidationException exp)
            {
                // Log the errors and warnings
                this.LogSchemaValidationErrors();

                this.Site.Assert.Fail(exp.Message);
            }
            catch (SoapException)
            {
                this.VerifySoapExceptionFault();
                throw;
            }

            return result;
        }
MS_LISTSWSAdapter