Solved

SharePoint Service Layer

Posted on 2010-11-10
11
1,161 Views
Last Modified: 2012-05-10
Hi,
Is there another way to get hold of documents in sharepoint 2010 apart from using the Client Object Model.

I have heard of Sharepoint Service Layer (for SharePoint 2010)???

Thanks!
0
Comment
Question by:racineconde
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
11 Comments
 
LVL 8

Accepted Solution

by:
static-void earned 500 total points
ID: 34100721
Sure is, there are several ways to get documents, you can do the following:

-  use the Rest api's (http://www.synergyonline.com/blog/blog-moss/Lists/Posts/Post.aspx?ID=117)
- Use the old style webservices ie /_vti_bin/lists.asmx

If you are working solely with 2010 i recommend using the rest api as it is faster.
0
 

Author Comment

by:racineconde
ID: 34101016
I am following the demo on your link. But adding the service reference to my sharepoint site I'm getting a lot credential requests and it just doen't seem to end. Do you know how to setup the site so that I enter the credentials only once or do you know a work-around that?
0
 

Author Comment

by:racineconde
ID: 34101228
This is the error I am getting when adding the service reference:
*************************************
The HTML document does not contain Web service discovery information.
Metadata contains a reference that cannot be resolved: 'http://win2008/'.
The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Negotiate,NTLM'.
The remote server returned an error: (401) Unauthorized.
If the service is defined in the current solution, try building the solution and adding the service reference again.
**********************************************
0
Office 365 Training for IT Pros

Learn how to provision tenants, synchronize on-premise Active Directory, implement Single Sign-On, customize Office deployment, and protect your organization with eDiscovery and DLP policies.  Only from Platform Scholar.

 
LVL 8

Expert Comment

by:static-void
ID: 34108282
That message says you are trying to use the guest account for access. What system are you attempting to access this information from and what language are you using?

Cheers
0
 

Author Comment

by:racineconde
ID: 34143773
I am trying to access a sharepoint site from a console application in C#
0
 
LVL 8

Expert Comment

by:static-void
ID: 34144068
Are you running the app with a domain account which has access to sharepoint? If you are im guessing that the connection details you are using are trying to specify an authentication mode other than windows auth
0
 

Author Comment

by:racineconde
ID: 34144149
I am not using any connection details. I am trying to reference the sharepoint site "http://mysite/" or "http://mysite/_vti_bin/ListData.svc" from my console application using the SharePoint datasource object (you can a data source adding a new data source in the "Data" menu in Visual Studio 2010).

I am getting this error when trying to reference both URLs above.
0
 
LVL 8

Assisted Solution

by:static-void
static-void earned 500 total points
ID: 34144299
it works fine for me, you can actually get to the same place by right clicking your project and selecting add service reference (btw). My recommendation would be to try to open this url in a browser, make sure it returns something and doesnt prompt for authentication. If its prompting for auth try running VS under an account which has access to your SharePoint site.
0
 

Author Comment

by:racineconde
ID: 34144693
The ListData.svc is used to interact with lists. Do you the service for interacting with document librarirs and documents?
0
 

Author Comment

by:racineconde
ID: 34144885
Never mind, I found out.
0
 

Author Closing Comment

by:racineconde
ID: 34153896
I had to run a few patches that I found about from other blogs on top the solution provided in this post
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Summary In SharePoint 2010 it is easy to create custom color themes to jazz up a site. Theme colors can also be created in PowerPoint 2010 with a few clicks. But how do the chosen colors actually look in the SharePoint site? The attached PowerPoint…
A recent project that involved parsing Tableau Desktop and Server log files to extract reusable user queries for use in other systems. I chose to use PowerShell to gather the data, and SharePoint to present it...
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question