SharePoint Web Services
- REST
- Client Object Model
- ASP.net
- WCF
REST
- Access to sharepoint lists and library data ( …/_vti_bin/listdata.svc)
- Lists and List items map to resources (listdata.svc/Employees(123) )
- Operation are mapped with HTTP verbs (GET, POST . . )
- Based on ADO.net Data Services
- Flexible URL conventions for querying data
- listdata.svc/Employees?$filder=JobTitle eq ‘SDE’
- $orderby=Fullname
- Multiple representations
- JSON and Atom (full AtomPub support)
- Batching, ETags, Paging, Documents
- Flexible URL conventions for querying data
Demo . . .
REST query is converted to CAML query…..
Integrated Development Experience in VS 2010 and VS 2008 SP1 using just “Add Reference”
- Data Source configuration has a new item to connect to SharePoint
- Master Details type application development
Client Object Model
- Supports
- Site Operations
- Lists, ListItems
- content types, fields
- but not administration namespace, farm objects
- Implemented as WCF Service
- …/vti_bin/client.svc
- It passes batch command to the WCF service (in XML)
- than the server executes and returns the data back to client (in JSON Other SharePoint Web Services
- Advanced Operations
- User Profiles
- People
- Search
- Enterprise Metadata
- Document Coauthoring
- Excek REST web services
- Publishing
- Workflow
- BCS web services
- ….. see MSDN
- we can also extend sharepoint and create custom web services
- ASP.net
- WCF (is now recommended for sharepoint 2010 custom service development)
WCF Services
- Problem
- IT Admin configures IIS
- Different authentication schemes can be configured (Basic, Claims, Windows Integrated . . .)
- Multiple IIS address bindings
- Developer configures WCF Service endpoint
- IT Admin configures IIS
- Solution
- Dynamic (Programmatic) configuration
this would be in RTM only - SOAP
- Specify Service Factory in SVC file
- Add MEX endpoint behavior attribute to the service class
- Deploy SVC service to ISAPI Folder
- REST
- Dynamic (Programmatic) configuration
Demo of creating custom WCF service inside sharepoint
- sandbox solutions doesn’t support services
WCF Service Configuration
- Service.svc
- SharePoint Service Factory creates the endpoint based on all authentications
- service.svc/negotiate
- service.svc/ntlm
- SharePoint Http Modules
No comments:
Post a Comment