使用NTLM对Lists.asmx进行身份验证之后,如何使Suds运行代理?WSDL?

问题描述

| 我正在尝试使用Python肥皂水通过服务来访问SharePoint列表,但是客户端组件存在一些困难。我首先在公司防火墙后面,这意味着当NTLM身份验证工作并且suds获得Lists.asmx?WSDL程序包时,它将尝试在Internet上获取该架构。它失败。 因此,我需要代理方面的帮助。我尝试了
Client.set_options( proxy = d )
,其中d是字典,Suds抱怨以下内容:
Client.set_options( proxy = d )
TypeError: unbound method set_options() must be called with Client instance
   as first argument (got nothing instead)
有任何想法吗?     

解决方法

        编辑:所以我找到了解决此问题的方法,可能/可能不会帮助OP,但在相同情况下肯定会帮助我。 \'NTML \'更正了错字。 解决方法是在本地缓存XMLSchema.xml文件(请参见此处:不能访问Internet的suds和soaplib)
import os.path
from suds.xsd import sxbasic
sxbasic.Import.bind(\'http://www.w3.org/2001/XMLSchema\',\'file://\' + os.path.join(ROOT_DIR,\'cache\',\'suds\',\'XMLSchema.xml\'))
并将XMLSchema.xml的本地副本保存在ROOT_DIR / cache / suds /中。 理想的解决方案是设置NTLM身份验证和suds代理,但是我仍然没有弄清楚该怎么做...     

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...