python如何连接自己电脑服务器,如何使用Python连接到Microsoft Dynamics CRM服务器?...

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)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值