sharepoint data anywhere and everywhere by chris beckett - sptechcon

Post on 05-Dec-2014

1.463 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Technical Class:

TRANSCRIPT

info@newsteplearning.comwww.newsteplearning.com(425) 522-3727

Professional Learning Programs for Microsoft SharePoint, Office 365 and Windows Azure

Understanding and ProgrammingSharePoint Web Services

About Chris Beckett

24+10MCMMCT

MCSEMCPD

Solution ArchitectLearning Consultant

and Trainer

chris@newsteplearning.com

@sharepointbits

blog.sharepointbits.com

Agenda

Introduction toSharePoint Web

Services

SOAPWeb Services

Client-SideObject Model REST API

What is a Web Service?

A software system designed to support interoperable machine-to-machine interaction over a network

W3C

A Web Services Story1 2 3

4 5 6

Available SharePoint Web Services

• Open Standards

• RPC Model

• Protocol Agnostic

• XML

• Microsoft Proprietary

• Batch RPC Model

• Client Runtime

• XML / JSON

• Open Standards

• REST Model

• HTTP Only

• ATOM / JSON

SOAPWeb Services

Client Side ObjectModel (CSOM)

ODATAWeb Services

SharePoint 2010 Web Service Access

SOAP CSOM ODATA

Lists and Libraries

Site and List Settings

Site Security

Workflow

Search

Managed Metadata

User Profiles

Publishing

SharePoint 2010 Web Service Clients

SOAP CSOM ODATA

JavaScript

Silverlight

.NET

Windows Phone

Other Languages

InfoPath Receive

InfoPath Submit

BCS WCF Connector

SharePoint 2013 Web Service Access

SOAP CSOM ODATA

Lists and Libraries

Site and List Settings

Site Security

Workflow

Search

Managed Metadata

User Profiles

Publishing

Deprecated

SharePoint 2010 Web Service Clients

SOAP CSOM ODATA

JavaScript

Silverlight

.NET

Windows Phone

Other Languages

InfoPath Receive

InfoPath Submit

BCS WCF Connector

Deprecated

Agenda

UnderstandingSharePoint Web

Services

Programming withSOAP-Based

Web ServicesProgramming with

the Client-SideObject Model

Programming withthe ODATA RESTful

Web Services

What is SOAP?

Created by Microsoft in 1998 / W3C Standard

Protocol Agnostic / Common to use HTTP

RPC Message Pattern (Request/Response)

XML Schema used for Message Structures

SOAP Request Message Format

SOAP Envelope

SOAP Body

Method and Parameters

SOAP Response Message Format

SOAP Envelope

SOAP Body

Response Xml

SOAP Considerations

• All Versions of SharePoint• Ubiquitous• Protocol Agnostic• Language Agnostic

• Access to Enterprise Services

• Designed to work with Proxy• Not JavaScript Friendly• Verbose Xml Data• No Anonymous

SharePoint Web Service AddressesWeb Service Web Service AddressSearch http://<site>/_vti_bin/search.asmxUser Profiles http://<site>/_vti_bin/userprofileservice.asmxSites http://<site>/_vti_bin/sites.asmxLists http://<site>/_vti_bin/lists.asmxPermissions http://<site>/_vti_bin/permissions.asmxCopy http://<site>/_vti_bin/copy.asmx

31 Public Web Services (25+6) in SharePoint

Service Descriptions

Provides Humans with Operations and Signatures

Web Service Definition Language

?WSDL

Visual Studio Service Reference

SpecifyWeb Service URL

Browse AvailableOperations

Specify ProxyNamespace

Proxy ClassName

Auto-generated Service ProxyCreate Proxy

Instance

Invoke Methods

ProcessOutput

SetCredentials

spservices.codeplex.com

Programming with SPServices

Create a Parameters Array

Anon Function forComplete

Invoke Library with Parameters

Agenda

UnderstandingSharePoint Web

Services

Programming withSOAP-Based

Web Services

Programming with the Client-SideObject Model

Programming withthe ODATA RESTful

Web Services

What is the CSOM?

Proprietary Microsoft SharePoint Client API

.NET / Silverlight / WP7 / ECMAScript

Mimics Server-side Object Model

Proprietary Message Transfer Format

CSOM Architecture

CSOM Considerations

• Efficient for Batch Operations• Familiar for SharePoint

Developers• Supports LINQ Queries• Works with Anonymous

• Less Efficient for Simple Operations• Unfamiliar to Web

Developers• Limited # of Client Runtimes• Microsoft Proprietary

Context and Authentication (.NET)

Default isWindows

Authentication

CSOM (ECMAScript)

Create a Context

Load the Context

Execute Async Query

Access Properties

CSOM (.NET)

Create a Context

Load the Context

Execute Query

Access Properties

CSOM Request

Protocol is documented, but you don’t want to be

hand-tooling these requests

Client Library Assemblies

* Silverlight located at:

/15/Template/Layouts/Client

.NET assemblies found under

/15/ISAPI

Client Components SDK

Installs all client runtime

components

Agenda

UnderstandingSharePoint Web

Services

Programming withSOAP-Based

Web Services

Programming with the Client-SideObject Model

Programming withthe ODATA RESTful

Web Services

What is REST?

Representational State Transfer

Web Addressable Resources / Hyperlink-able

Maps CRUD operations with HTTP Verbs

Commonly uses JSON for Data Messages

REST Considerations

• Efficient for Batch Operations• Familiar for SharePoint

Developers• Supports LINQ Queries• Works with Anonymous

• Less Efficient for Simple Operations• Unfamiliar to Web

Developers• Limited # of Client Runtimes• Microsoft Proprietary

www.odata.org

ODATA Operations and Parameters

GET (Retrieve)POST (Create)PUT (Update All Fields)DELETE (Delete)MERGE (Update Specific)

$filter={simple predicate}$expand={Entity}$order by={property}$skip={n}$top={n}$metadata

Operations Parameters

List Data Service (ECMA Script)

More Information

Choose the Right API set with SharePoint 2013http://msdn.microsoft.com/en-us/library/jj164060.aspx

Complete Basic Operations with the SharePoint 2013 Client Libraryhttp://msdn.microsoft.com/en-us/library/fp179912.aspx

Programming using the SharePoint 2013 REST Servicehttp://msdn.microsoft.com/en-us/library/fp142385.aspx

SharePoint 2010 Web Serviceshttp://msdn.microsoft.com/en-us/library/ee705814(v=office.14).aspx

Accessing SharePoint 2010 Lists by Using WCF Data Serviceshttp://msdn.microsoft.com/en-us/library/hh134614(v=office.14).aspx

Questions

Thank you for attending!

Please complete your evaluations. Your feedback is appreciated

chris@newsteplearning.

com

(425) 522-3727

@sharepointbits

blog.sharepointbits.co

m

top related