Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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
- from suds import WebFault
- from suds.client import *
- from suds.transport.https import WindowsHttpAuthenticated
- user = 'SERVERuser'
- password = "yourpassword"
- url = "http://sharepointserver/_vti_bin/SiteData.asmx?WSDL"
- ntlm = WindowsHttpAuthenticated(username = user, password = password)
- client = Client(url, transport=ntlm)
Add Comment
Please, Sign In to add comment