3.1.4.57 SetCrawlRuleCredentials

This operation is used to configure the authentication method and crawl account for a crawl rule.

 <wsdl:operation name="SetCrawlRuleCredentials">
         <wsdl:input message="SetCrawlRuleCredentialsSoapIn"/>
         <wsdl:output message="SetCrawlRuleCredentialsSoapOut"/>
 </wsdl:operation>

The protocol client sends a SetCrawlRuleCredentialsSoapIn request message and the protocol server responds with a SetCrawlRuleCredentialsSoapOut response message, as follows:

  • On receipt the protocol server validates the versionIn value from the request message. If it doesn’t match the current configuration version of the crawler application, the protocol server MUST throw a SOAP fault message containing an UpdatedConcurrencyException.

  • The protocol server then updates the current configuration version of the crawler application to the value of versionIn+1.

  • The protocol server MUST normalize the path element of the request message the same way it normalizes the path element of the ActivateCrawlRule operation request message              

  • If there is no crawl rule in the crawl rule collection which has a URL equal to the normalized path, the protocol server MUST throw SOAP fault message containing DeletedConcurrencyException.

  • The protocol server updates the authType property of the crawl rule from the corresponding parameter of the method.

    • If the authType is 0, the protocol server MUST set the accountName property of the crawl rule to empty string, and the password property of the crawl rule to an empty string.

    • If the authType is 1, the protocol server MUST set the accountName property of the crawl rule to the value of authString1, and the password property of the crawl rule to the value of authString2. The protocol server MUST validate the correctness of the credentials on the index server. If credentials are invalid, the protocol server MUST throw SOAP fault message containing a COMException.

    • If the authType is 2, the protocol server MUST set the accountName property of the crawl rule to the value of authString1 element, and the password property of the crawl rule to the value of authString2 element.

    • If the authType is 3, the protocol server MUST set the certificateName property of the crawl rule to the value of authString1 element.

    • If the authType is 4, the protocol server MUST set the password property of the crawl rule to the value of the authString1 element. Then, the protocol server MUST extract and sets the authUrl, authData, authMethod and miscData properties of the crawl rule from the value of the authString2 element.

    • If the authType is 5, the protocol server MUST set the cookieName property of the crawl rule to the value of the authString1 element, and sets the miscData property of the crawl rule to the value of the authString2 element.

  • On success, the protocol server MUST return the updated configuration version of the crawler application in the SetCrawlRuleCredentialsResult element of the response message.

  • On error, the protocol server MUST throw a SOAP fault message.