开发者

Using Ruby to upload files to Sharepoint 2003

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_U开发者_开发技巧RL = '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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜