3.1.4.7 AddScope

This operation is used by the protocol client to add a new search scope in the search application.

 <wsdl:operation name="AddScope">
   <wsdl:input wsam:Action="http://tempuri.org/ISearchSiteAdministrationServiceApplication/AddScope" message="tns:ISearchSiteAdministrationServiceApplication_AddScope_InputMessage"/>
   <wsdl:output wsam:Action="http://tempuri.org/ISearchSiteAdministrationServiceApplication/AddScopeResponse" message="tns:ISearchSiteAdministrationServiceApplication_AddScope_OutputMessage"/>
 </wsdl:operation>

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

  • The protocol client MUST specify the search scope information to create a new scope.

  • On receipt the protocol server checks if the caller has the right privileges to add search scope in the protocol server. If not, the protocol server MUST return a FaultException<ExceptionDetail> error message.

  • Protocol server MUST check if scopeInfo is NULL. If yes, the protocol server MUST return a FaultException<ExceptionDetail> error message.

  • Protocol server MUST check if scopeInfo.ConsumerName is NULL. If yes, the protocol server MUST return a FaultException<ExceptionDetail> error message.

  • Next, the protocol server MUST check whether the scopeInfo.CompilationType is of ScopeCompilationType data type, as specified in section 2.2.5.10. If it is not of valid type, the protocol server MUST return a FaultException<ExceptionDetail> error message.

  • On success, the protocol server MUST create the search scope with details specified in scopeInfo and MUST increment the ConsumerInfo.LastRefreshTimeStamp of the search scope consumer with name as specified by scopeInfo.ConsumerName. The protocol server MUST return a unique identifier for search scope in AddScopeResult. The protocol server MUST return statusCode as 0.

  • On error, the protocol server MUST return statusCode with nonzero value and AddScopeResult MUST be set to -1. statusCode MUST be set to 2627 if scope with the same name already exists. statusCode MUST be set to 1 if scopeInfo.ConsumerName is not found on protocol server. AddScopeResult MUST be set to -1.