4.2 SearchAll

In this example, protocol client calls the SearchAll method to search the entities on two claims providers ("System" and "All Users") with a search pattern "domain\user1". The URI of the Web application (1) (http://localhost) and the maximum number of matched entities to be returned (100) are also specified.

The protocol server has four claims providers: System, AllUsers, Group and People. The System claims provider has claim types - Application Pool Identity and Farm identifier. The protocol server has a Web application (1) (http://localhost) that is configured to use claim-based authentication mode.

The protocol client constructs the following message:

 <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
     <SearchAll xmlns="http://tempuri.org/" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
       <context>http://localhost</context>
       <providerNames>
         <string>System</string>
         <string>Groups</string>
       </providerNames>
       <searchPattern>Domain\User1</searchPattern>
       <maxCount>100</maxCount>
     </SearchAll>
   </s:Body>
 </s:Envelope>

The protocol server responds with following message:

 <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
     <SearchAllResponse xmlns="http://tempuri.org/">
       <SearchAllResult>
         <SPProviderHierarchyTree>
           <Nm>System</Nm>
           <ProviderName>System</ProviderName>
           <HierarchyNodeID/>
           <IsLeaf>false</IsLeaf>
           <Children>
             <SPProviderHierarchyNode>
               <Nm>Application Pool Identity</Nm>
               <ProviderName>System</ProviderName>              <HierarchyNodeID>http://schemas.microsoft.com/sharepoint/2009/08/claims/processidentitylogonname</HierarchyNodeID>
               <IsLeaf>true</IsLeaf>
               <Children/>
               <EntityData>
                 <PickerEntity>
                   <Key>c:0'0c|System|Domain\User1</Key>
                   <DisplayText>Domain\User1 (/sharepoint/2009/08/claims/processidentitylogonname)</DisplayText>
                   <IsResolved>true</IsResolved>
                   <Description/>
                   <EntityType>System</EntityType>
                   <EntityDataElements/>
                   <MultipleMatches/>
                 </PickerEntity>
               </EntityData>
               <Count>-1</Count>
             </SPProviderHierarchyNode>
             <SPProviderHierarchyNode>
               <Nm>Farm ID</Nm>
               <ProviderName>System</ProviderName>              <HierarchyNodeID>http://schemas.microsoft.com/sharepoint/2009/08/claims/farmid</HierarchyNodeID>
               <IsLeaf>true</IsLeaf>
               <Children/>
               <EntityData/>
               <Count>-1</Count>
             </SPProviderHierarchyNode>
           </Children>
           <EntityData/>
           <Count>-1</Count>
           <IsRoot>true</IsRoot>
         </SPProviderHierarchyTree>
       </SearchAllResult>
     </SearchAllResponse>
     </s:Body>
 </s:Envelope>