Solved

SharePoint Service Layer

Posted on 2010-11-10
11
1,113 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
  • 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
 
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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now