The Microsoft Dynamics CRM service uses NTLM authentication, which makes connecting to it from a python process using suds somewhat complicated. I'm looking for a code sample that will:
Send and receive the response from a RetrieveAttributeRequest
Send and receive the response from an Execute request.
This must use Python 2.6 or Python 2.7, not Python 3. I already have a working implementation that uses curl to do this, but it's flaky at the best of times, and as part of some other work I have in this tool I'd like to clean it up and make it run using python/suds.
解决方案
I know this is a bit late but hopefully it will help someone.
NTLM authentication was added to suds in version 0.3.8.
from suds.transport.https import WindowsHttpAuthenticated
from suds.client import Client
url = 'http://crmurl/XRMServices/2011/Discovery.svc?wsdl'
ntlm = WindowsHttpAuthenticated(username='DOMAIN\username', password='password')
client = Client(url, transport=ntlm)