views:

26

answers:

1

Disclaimer: My Sharepoint knowledge is slim, and my Ruby knowledge is novice-moderate.

I need to be able to programmatically upload files to a Sharepoint server. So far, I've been looking into the Savon gem (patched to add NTLM auth) to accomplish this.

Sample code so far:

require 'rubygems'
require 'savon'

WSDL_URL = 'http://<server removed>/_vti_bin/Lists.asmx?wsdl'
SP_USERNAME = 'user'
SP_PASSWORD = 'password'

client = Savon::Client.new(WSDL_URL)
client.request.ntlm_auth(SP_USERNAME, SP_PASSWORD)
puts client.wsdl.soap_actions

This all works fine, but I'm at a loss where to go next in order to upload files. Any help would be appreciated.

+1  A: 

Hi Eudeym

In order to upload/download files to/from SharePoint you don't need the Web Services

To upload just use HTTP PUT requests.
Here is an example in C# Uploading Files to SharePoint Server 2007 from ASP.NET Web Applications by Using the HTTP PUT Method

To download just use HTTP GET requests

Per Jakobsen
Thanks for your response. However, can go into more detail about how to accomplish that? Sorry if it seems like a simple answer, but I've focused my efforts solely into using web services, so I'm not sure how to interact with a Sharepoint server directly using HTTP requests.
Eudeyrn
I have no Ruby knowledge, but have added a link to a c# example in my reply above
Per Jakobsen