Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sharepoint Web Services Tutorial

I'm trying to upload documents to SharePoint using web services attaching custom metadata to the files. I've searched but have not found a good tutorial covering all these topics. Can anybody point me in the right direction?

Here's why I think I need to use web services: I'm developing on XP and the Sharepoint object model is not remotable. This means any code which has "using Microsoft.Sharepoint" is out :-( I'm looked into the CopyIntoItems web service but am having trouble implementing it myself. I was hoping for a clear tutorial. I've tried using the sample code from http://msdn.microsoft.com/en-us/library/copy.copy.copyintoitems.aspx , but I'm not sure what my sourceURL should be. Also, since I can't use "Microsoft.Sharepoint" references, I'm wondering what my Fields will look like? (Is this my metadata?) Also, I'm curious as to why only Website projects allow me to add a web service. Once the file is "in" Sharepoint using that web service, I'll have to use another one to update custom columns, or metadata. Some of these are freeform text, but other must match entries in lists or lookups. I haven't found any information on this yet.

Thank you for your help!

like image 291
Dave Avatar asked Oct 29 '08 14:10

Dave


People also ask

What are web services in SharePoint?

Provides methods for working with alerts for list items in a SharePoint site. WebSvcCopy. Provides services for copying files within a SharePoint site and between SharePoint sites. WebSvcDWS. Provides methods for managing Document Workspace sites and the data they contain.

Is there an API for SharePoint?

SharePoint offers a rich set of APIs that can be consumed in various ways. This article outlines what options you have, how they work and what their advantages and disadvantages are.

Can SharePoint be used as a Web server?

SharePoint can be used as a web server to host sites in your organization that are not connected to SharePoint directly, however with the modern experience this is blocked by default. In this article I'll explain you how to bring back this awesome functionality to modern Communication and Team sites.


1 Answers

Here is some code http://geek.hubkey.com/2007/10/upload-file-to-sharepoint-document.html

As for why it is that is the way because Microsoft wrote it that way :). Some people have written custom web services that combine them, http://www.sharepointblogs.com/ssa/archive/2006/11/30/wsuploadservice-web-service-for-uploading-documents-into-sharepoint.aspx

Using the built in web services you have to upload the file and upload CAML which contains the columns. Another option if you are using a MS-Office document is to make sure the author fills in the properties in the document then you can have those fields displayed in sharepoint.

like image 110
Will Dieterich Avatar answered Sep 21 '22 04:09

Will Dieterich