4.1 Retrieve Book Information

In this example, a protocol client requests information about a book by using the book identifier "3387ac63-e73d-421f-bff7-359a4aa2bc38". The protocol client also requests author and status information for the book that is associated with identifier "704655a3-c136-469c-a578-f79652a93f9b".

The protocol client sends the following message:

 <Request 
   AddExpandoFieldTypeSuffix="true" 
   SchemaVersion="15.0.0.0" 
   LibraryVersion="15.0.0.0" 
   ApplicationName=".NET Library" 
   xmlns="http://schemas.microsoft.com/sharepoint/clientquery/2009">
   <Actions>
     <ObjectPath Id="2" ObjectPathId="1" />
     <ObjectPath Id="4" ObjectPathId="3" />
     <ObjectPath Id="6" ObjectPathId="5" />
     <Query Id="7" ObjectPathId="5">
       <Query SelectAllProperties="true">
         <Properties />
       </Query>
     </Query>
     <ObjectPath Id="9" ObjectPathId="8" />
     <Query Id="10" ObjectPathId="8">
       <Query SelectAllProperties="false">
         <Properties>
           <Property Name="Author" ScalarProperty="true" />
           <Property Name="Status" ScalarProperty="true" />
         </Properties>
       </Query>
     </Query>
   </Actions>
   <ObjectPaths>
     <StaticProperty Id="1" TypeId="{acc57e47-24b0-4400-b1c7-aa1cf3c9542d}" Name="Catalog" />
     <Property Id="3" ParentId="1" Name="Books" />
     <Method Id="5" ParentId="3" Name="GetById">
       <Parameters>
         <Parameter Type="Guid">{3387ac63-e73d-421f-bff7-359a4aa2bc38}</Parameter>
       </Parameters>
     </Method>
     <Method Id="8" ParentId="3" Name="GetById">
       <Parameters>
         <Parameter Type="Guid">{704655a3-c136-469c-a578-f79652a93f9b}</Parameter>
       </Parameters>
     </Method>
   </ObjectPaths>
 </Request>

The protocol server responds with the following message:

 [
   {
     "SchemaVersion" : "15.0.0.0",
     "LibraryVersion" : "15.0.3421.3000",
     "ErrorInfo" : null
   },
   2,
   {
     "IsNull" : false
   },
   4,
   {
     "IsNull" : false
   },
   6,
   {
     "IsNull" : false
   },
   7,
   {
     "_ObjectType_" : "SampleCode.Book",
     "Author" : "Soha Kamal",
     "Id" : "\/Guid(3387ac63-e73d-421f-bff7-359a4aa2bc38)\/",
     "PublishDate" : "\/Date(2008,2,1,0,0,0,0)\/",
     "Status" : 0,
     "Title" : "How to Cook Chinese Food"
   },
   9,
   {
     "IsNull" : false
   },
   10,
   {
     "_ObjectType_" : "SampleCode.Book",
     "Author" : "Patrick Hines",
     "Status" : 0
   }
 ]