문제

Python (C-Python)과 함께 SharePoint를 사용하고 싶습니다.

누구든지 전에 이것을 시도한 적이 있습니까?

도움이 되었습니까?

해결책

이 질문에 대한 답변 이후 SUDS 라이브러리가 필요한 인증 자체를 처리하기 위해 업데이트되었다고 생각합니다. 다양한 후프를 뛰어 넘은 후, 나는 이것이 트릭을 수행하는 것을 발견했습니다.


from suds import WebFault
from suds.client import *
from suds.transport.https import WindowsHttpAuthenticated


user = r'SERVER\user'
password = "yourpassword"
url = "http://sharepointserver/_vti_bin/SiteData.asmx?WSDL"


ntlm = WindowsHttpAuthenticated(username = user, password = password)
client = Client(url, transport=ntlm)

다른 팁

WSDL을 얻으려면 :

import sys

# we use suds -> https://fedorahosted.org/suds
from suds import WebFault
from suds.client import *
import urllib2

# my 2 url conf
# url_sharepoint,url_NTLM_authproxy 
import myconfig as my 

# build url
wsdl = '_vti_bin/SiteData.asmx?WSDL'
url = '/'.join([my.url_sharepoint,wsdl])


# we need a NTLM_auth_Proxy -> http://ntlmaps.sourceforge.net/
# follow instruction and get proxy running
proxy_handler = urllib2.ProxyHandler({'http': my.url_NTLM_authproxy })
opener = urllib2.build_opener(proxy_handler)

client = SoapClient(url, {'opener' : opener})

print client.wsdl

Main (평균) 문제 : SharePoint-Server는 NTLM-Auth [:-(]를 사용하여 NTLM-Auth-Proxy를 사용해야했습니다.

Rob and Enzondio에게 : 힌트에 감사드립니다!

파이썬이있는 비누는 매우 쉽습니다. 다음은 튜토리얼입니다 다이빙에서 파이썬으로.

SharePoint는 데이터를 쿼리하고 업데이트하는 데 사용할 수있는 여러 웹 서비스를 노출시킵니다.

파이썬에 어떤 웹 서비스 툴킷이 있는지 잘 모르겠지만 문제없이 이러한 서비스에 대한 프록시를 구축 할 수 있어야합니다.

이 기사는 시작하기에 충분한 정보를 제공해야합니다.

http://www.developer.com/tech/article.php/3104621

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top