【问题标题】:SharePoint via SOAP using Python使用 Python 通过 SOAP 进行 SharePoint
【发布时间】:2009-07-03 09:33:07
【问题描述】:

我一直在关注此处提到的解决方案 - 因为这正是我需要实现的目标;

how can i use sharepoint (via soap?) from python?

但是,当我运行这段代码的最后一行时,我收到以下错误;

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

Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "build\bdist.win32\egg\suds\client.py", line 456, in __init__
AttributeError: 'str' object has no attribute 'options'

欢迎任何有关如何解决此问题的建议或建议!

【问题讨论】:

    标签: python sharepoint soap suds


    【解决方案1】:

    根据https://fedorahosted.org/suds/browser/trunk/suds/client.py?rev=504

    434     class SoapClient:
    ...
    445         """
    446     
    447         def __init__(self, client, method):
    448             """
    449             @param client: A suds client.
    450             @type client: L{Client}
    451             @param method: A target method.
    452             @type method: L{Method}
    453             """
    454             self.client = client
    455             self.method = method
    456             self.options = client.options
    457             self.cookiejar = CookieJar()
    

    SoapClient 的第一个参数不是string,而是Client 类的对象。您的参数不是所需类的实例。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-04-13
      • 1970-01-01
      • 1970-01-01
      • 2011-07-05
      • 1970-01-01
      • 2011-12-25
      相关资源
      最近更新 更多