3.1.4.20 UpdateContentTypeXmlDocument

This operation<25> adds or updates an XML document in the XML Document collection of a site content type. This operation is defined as follows:

 <wsdl:operation name="UpdateContentTypeXmlDocument">
     <wsdl:input message="tns:UpdateContentTypeXmlDocumentSoapIn" />
     <wsdl:output message="tns:UpdateContentTypeXmlDocumentSoapOut" />
 </wsdl:operation>

The protocol client sends an UpdateContentTypeXmlDocumentSoapIn request message, and the protocol server responds with an UpdateContentTypeXmlDocumentSoapOut response message, as follows:

  1. If the content type specified by the contentTypeId is not found, the protocol server MUST return a SOAP exception.

  2. If the content type specified by the contentTypeId is a sealed content type, the protocol server MUST return a SOAP exception.

  3. If newDocument is malformed XML, the protocol server MUST return a SOAP exception.

  4. If an XML document with the same namespace URI already exists, it is replaced by the new XML document.

  5. Otherwise, the new XML document is wrapped in an XmlDocument element and added to the content type XML Document collection.