3.1.4.1 ActivateCrawlRule

This operation is used to enable an existing crawl rule.

 <wsdl:operation name="ActivateCrawlRule">
         <wsdl:input message="ActivateCrawlRuleSoapIn"/>
         <wsdl:output message="ActivateCrawlRuleSoapOut"/>
 </wsdl:operation>

The protocol client sends an ActivateCrawlRuleSoapIn request message and the server responds with an ActivateCrawlRuleSoapOut 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 from the request message as follows:

    • If the path is empty or contains only white-space characters, the protocol server MUST throw a SOAP fault message containing a COMException with the HRESULT field set to 0x80040d34.

    • If the length of the path is greater than or equal to 2048 characters, the protocol server MUST throw a SOAP fault message containing COMException with the HRESULT field set to 0x80040d14.

    • If the path is a UNC path expression, the protocol server MUST convert it to the URL with a "file" URL scheme as described in [RFC2396], section 3.1.

    • If the path is not a UNC path expression, the protocol server MUST replace all ‘\’ characters with the ‘/’ character.

    • If the URL scheme, as described in [RFC2396], section 3.1 is not specified in the path, the protocol server MUST prepend path with the "http" scheme. 

    • If prepending the path with the "http" scheme causes the length of the resulting path to become greater than or equal to 2048 characters, the protocol server MUST throw a SOAP fault message containing a COMException with the HRESULT field set to 0x80010105.

    • If the host name in the path contains a '@' character, a '#' character, a '|' character, or a white-space character, the protocol server MUST throw a SOAP fault message containing a COMException with the HRESULT field set to 0x80040d50.

    • If the URL scheme as described in [RFC2396], section 3.1 in the path is "http" or "https", the protocol server MUST convert it to a URL-encoded string.

  • If the crawl rule identified by normalized path does not exist, the protocol server MUST throw a SOAP fault message containing a DeletedConcurrencyException.

  • The protocol server MUST set the enabled property of the crawl rule to true.

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

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