1

I understand that using a managed client object model communicated via a web service to the Server-side Object Model. But I can't find any documentation on whether this is a RESTful or SOAP service. Does anyone know of any documentation on this service architecture?

Jack
  • 10,313
  • 15
  • 75
  • 118

1 Answers1

2

Good Question.

Take this code for example:

 using (ClientContext clientContext = new ClientContext(siteUrl))
        {
            clientContext.Credentials = getServiceAccountCredential();

            SP.List invoicesList = clientContext.Web.Lists.GetByTitle("Approved Invoice Allocations");

            CamlQuery camlQuery = new CamlQuery();
            camlQuery.ViewXml = @"<View> <Query> <Where> <Eq> <FieldRef Name='Invoice_x0020_ID'/> <Value Type='Lookup'>" + invoice_id +
                                "</Value> </Eq> </Where> </Query> <RowLimit>1000</RowLimit> </View>";
            ListItemCollection collListItems = invoicesList.GetItems(camlQuery);

            clientContext.Load(collListItems);
            clientContext.ExecuteQuery();
        } 

Looking at the request and response headers in Fiddler tool when clientContext.ExecuteQuery or ExecuteQueryAsync is executed, below are some observations

1) A POST request is sent to SharePoint REST service webUrl/_vti_bin/client.svc/ProcessQuery

2) Request sent is in XML format

3) Response is in JSON format

See this MSDN article for more information

Ken
  • 734
  • 2
  • 8
  • 22