3.1.4.6 ApplyContentTypeToList

The ApplyContentTypeToList operation<38> is used to apply an existing site content type to the requested list.

 <wsdl:operation name="ApplyContentTypeToList">
     <wsdl:input message="ApplyContentTypeToListSoapIn" />
     <wsdl:output message="ApplyContentTypeToListSoapOut" />
 </wsdl:operation>
  

The protocol client sends an ApplyContentTypeToListSoapIn request message (section 3.1.4.6.1.1) and the protocol server responds with an ApplyContentTypeToListSoapOut response message (section 3.1.4.6.1.2), as follows:

  1. If the content type cannot be found, the protocol server MUST return a SOAP fault. There is no error code returned for this fault.

  2. If the specified listName is a valid GUID and corresponds to the identification of a list on the site, use that list.

  3. If the specified listName is not a valid GUID or does not correspond to the identification of a list on the site, check if the listName corresponds to the list title of a list on the site and if so, use that list.

  4. If listName does not correspond to a list from either of these checks, the protocol server SHOULD<39> return a SOAP fault with error code 0x82000006. This indicates that the list does not exist or might have been deleted by another user.

  5. Otherwise, after the method runs, the requested list will have the content type added to its list of valid content types.