access SharePoint files and folders from outside of SharePoint
I need to access SharePoint files and folders from outside of SharePoint. Specifically I have a WCF service running on an IIS server. The client is Silverlight, but that shouldn't matter. All the business logic is in the WCF service. The service has functions that return subfolders within a folder and files within a folder. It uses System.IO to do this and works well for any folder on the server or any share on the network. The purpose it to browse to a data file to import into a SQL Server database. The users have asked if they can use SharePoint as the staging area. That way they can upload the data file from outside of the VPN. The system admin tells me that I can only access the folders and files within SharePoint with URL type addressing. Is this true? If so, the objects in System.IO will not work with URI addresses. What do I use instead of System.IO to browse folders and files programatically from outside of SharePoint? Thanks, dogulas
July 12th, 2011 4:48pm

Moderator Note: Most (all?) of this post is about SP 2010. I'm leaving it here because at the time it was posted the thread was in a SP 2010 forum and therefore the replies here were 100% valid. Do not however regard this as meaning that SP 2010 links etc. are valid in pre-SP 2010 forums - in most cases either the posts will be removed or the SP 2010 parts edited out. (Later the OP said he was asking about SP 2007) I would suggest looking at the client side object model. This gives you the ability to change and create almost everything in SharePoint. Here is one blog post to give an overview. http://www.codeproject.com/Articles/60348/SharePoint-2010-Client-Object-Model-for-JavaScript Here is a post which shows in JavaScript how to create folders with JS. http://social.technet.microsoft.com/Forums/en-US/sharepoint2010programming/thread/8bd508f5-50dc-443b-84fd-e375ec32d1ce/ Here is a post showing how to use WCF inside a JavaScirpt script. http://www.learningsharepoint.com/2010/10/16/using-wcf-service-in-client-object-model-sharepoint-2010/ Another code sample where you are calling JavaScirpt from a *.svc file. http://everythingworkflow.wordpress.com/2010/11/16/sharepoint-client-object-model-access-from-wcf-soa-service/ Good luck, Gary blog www.sharepoint2010now.com Gary Newman MCSE, MCT, CCNA MCDBA, MCAD, MCSA MCTS SharePoint 2007 Dev & Admin MCPD SharePoint 2010 Development Blog www.sharepoint2010now.com
Free Windows Admin Tool Kit Click here and download it now
July 12th, 2011 4:54pm

Well -since you are already working with your WCF programatically, you could also access SharePoint programatically via the API. Here is a link which gives a good overview of how to do that: http://msdn.microsoft.com/en-us/library/ee857094.aspx Jeff DeVerter, MCSE Rackspace blog:http://www.social-point.com twitter: http://www.twitter.com/jdeverterJeff DeVerter
July 12th, 2011 4:55pm

Gary and Jeff, Thanks for the quick replies. I will run down these links and let you know where it takes me. Thanks, dogulas
Free Windows Admin Tool Kit Click here and download it now
July 12th, 2011 5:11pm

Gary, Jeff, and others, I went down the path with "SharePoint Foundation 2010 Managed Client Object Model". It took a while to get it working, but now it is perfect. The problems started when I went to deploy this to my client and they told me "No, we are still using 2007". This solution won't work. I then started looking at built-in Web services for SharePoint 2007. I went to add the web service as a service in my WCF service and had a huge problem finding the correct URL. It wasn't clear at all to me and I had to try a brute force method of trying everything I could think of. This took a couple of days to find. My default URL to get to SharePoint as a user is "http://alpha/sites/accip/default.aspx". Browsing to the URL "http://alpha/_vti_bin/dws.asmx" lets me see the user friendly page that discribes the service, but when I click on "Service Description", It errors with "404 not found". I can't tell you how many URLs I tried in the Add Service page, but the only one that worked was "http://alpha/sites/accip/_vti_bin/DWS.asmx?wsdl". Now the problem is that what I find in the service does not match anything I can find in the way of documentation. According to the documentation, the Document Workspace Web Service contains only one class: DWS. http://msdn.microsoft.com/en-us/library/ms774834(v=office.12).aspx When I look at intellisense of the Document Workspace Web Service that I imported, there is no class called DWS. The closest thing I could find was "DwsSoapClient". When I tried to get help for this class I get "Page Not Found" from MSDN. None of the properties or examples line up with the documentation. This is extremely frustrating. What is going on here? What am I doing wrong? Any help or pointers will be very welcome. Thanks, dogulas
July 18th, 2011 9:48am

To the interested reader, To complete this thread, I'll sum up what we decided. We were wanting to use SharePoint as a staging area for files to be imported into a database. The user would upload a file to a SharePoint folder then run a program that would pull the file and import it into the database. Since I could never get Web services for SharePoint 2007 to work, we decided to not waste any more time on this and to user a File Share instead. Thanks, dogulas
Free Windows Admin Tool Kit Click here and download it now
July 19th, 2011 1:47pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics