3
votes

We have REST webservices for List and Document listing in Sharepoint 2010 in this format . http://{server_name}/{site}/_vti_bin/ListData.svc/{Document_Library_name}

But the ListData.svc don't work for Sharepoint 2007 !! Is there a way to make this work ? Or some different way by which we can make REST Webservice call to my Sharepoint 2007 Site to list out the Site Tree, Folders list, document list url etc ..

Thanks in advance .

1

1 Answers

0
votes

WCF Service requests use a URL format SharePoint 2007 doesn't understand (they start with the relative path character "~"). This is easy to fix with an HttpModule. This will let you use WCF Services from within SharePoint 2007 (assuming you also decorate the service as requiring ASP.NET Pipeline...)

When it comes to RESTful services, these are generally not compatible especially when using route URLs. There is a way to overcome this but it requires replacing much of SharePoint's handling and at that point, why bother using SharePoint at all as the host? If you're willing to go this far, it'd be better to just use a standalone app, run it on the same server(s) as SharePoint inside its own App Pool but using the same SharePoint App Pool Identity. With this you can still access SharePoint resources using object model code but not be encumbered by the rest of it.

Alternatively you could write your standalone app to consume the SharePoint services to act as a facade. Though I still think this is unnecessary.

I wrote a blog post about creating SharePoint 2007 Enabled WCF Services some time ago when creating a Silverlight application we wanted to run using WCF Service data that had access to the SharePoint OM code, current user, etc. The specific section related to the WCF Services references some resources I'd found.