Ruby / Rails and Sharepoint Web Services

I am trying to use Sharepoint web services with ruby. I basically refused NTLM authentication and temporarily changed the Sharepoint server to use basic authentication. I successfully get WSDL using soap4r, but cannot authenticate when trying to use the actual web service call.

Does anyone have experience getting ruby ​​and Sharepoint?

+6
ruby ruby-on-rails web-services sharepoint soap4r
source share
4 answers

I am a complete newbie. But after a lot of time and with some help from more experienced coders, I was able to get a ruby ​​working with Sharepoint 2010. The code below requires the ntlm / mechanize jewel.

I was able to load the sharepoint xml from the specified lists (below) using the list GUID and List type GUID.

Change (May 23, 2011). I should have indicated that this code requires the ruby-ntlm gem. Here's a decent link that should help. It definitely works.

http://rubydoc.info/gems/ruby-ntlm/0.0.1/file/README.markdown

agent = Mechanize.new agent.auth('domain\\USERNAME', 'PASSWORD') page = agent.get('http://URL/DIRECTORY/SITE/LIST/_vti_bin/owssvr.dll?Cmd=Display&List={LIST_GUID}&View={VIEW_GUID}&XMLDATA=TRUE') 
+4
source share

How did you change the SP server to use Basic Auth? Did you just configure the site through IIS or did it through SP Central Admin?

If you are using SP 2007 / MOSS, you need to change it through Central Admin; if in 2003 you need to do this through IIS.

What error occurs when a request fails?

+1
source share

NTLM is not supported by soap4r in any way, while httpclient supports it.

If enabling auth is not an option, you might consider using kerberos, i.e. negotiate auth method. Including this in sharepoint is a bit complicated, but it basically boils down to doing the following on the command line server:

 cscript adsutil.vbs set w3svc/1/NTAuthenticationProviders "Negotiate,NTLM" 

Perhaps he has some strange enslavements, check out this forum post for more information . Finally, you need to set authentication in soap4r using auth = instead of basic_auth = I think.

+1
source share

This may not help, but micorosoft will just release the tools for Sharepoint and WSRP, http://blogs.msdn.com/sharepoint/archive/2008/12/15/announcing-the-wsrp-toolkit-for-sharepoint.aspx , as RoR supports this standard, which it can provide an easier way to receive data.

0
source share

All Articles