3.1.4.71 TestCrawlRule

This operation is used to check if a specified URL matches the specified crawl rule.

 <wsdl:operation name="TestCrawlRule">
         <wsdl:input message="TestCrawlRuleSoapIn"/>
         <wsdl:output message="TestCrawlRuleSoapOut"/>
 </wsdl:operation>

The protocol client sends a TestCrawlRuleSoapIn request message and the protocol server responds with a TestCrawlRuleSoapOut 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 MUST normalize the path element of the request message the same way it normalizes the path element of the ActivateCrawlRule operation request message.

  • The protocol server MUST try to find the crawl rule in the crawl rules collection of the portal content project by the value of the normalized path.  (The path element represents the crawl rule the protocol client wishes to test).

  • If no matching crawl rule is found, the protocol server MUST throw a SOAP fault message containing a DeletedConcurrencyException.

  • If a matching crawl rule is found, the protocol server first normalizes the URL specified by the url element of the request message the same way it normalizes the path element of the ActivateCrawlRule operation request message.

  • The protocol server then matches the normalized URL with the crawl rule and MUST return true in the TestCrawlRuleResult element of the response message if the URL matches the crawl rule, and false in the TestCrawlRuleResult element of the response message if the URL does not match.

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