views:

194

answers:

1

Has anybody had any recent success with accessing the Crowd SOAP API via the Suds Python library?

I've found a few people successfully doing it in the past but Atlassian seems to have changed their WSDL since then to make the existing advice not entirely helpful.

Below is the simplest example I've been trying:

from suds.client import Client
url = 'https://crowd.hugeinc.com/services/SecurityServer?wsdl'
client = Client(url)

Unfortunately that generates the following error:

Traceback (most recent call last):
  File "<input>", line 1, in <module>
  File "/Users/soconnor/.virtualenvs/hugeface/lib/python2.6/site-packages/suds/client.py", line 116, in __init__
    sd = ServiceDefinition(self.wsdl, s)
  File "/Users/soconnor/.virtualenvs/hugeface/lib/python2.6/site-packages/suds/servicedefinition.py", line 58, in __init__
    self.paramtypes()
  File "/Users/soconnor/.virtualenvs/hugeface/lib/python2.6/site-packages/suds/servicedefinition.py", line 137, in paramtypes
    item = (pd[1], pd[1].resolve())
  File "/Users/soconnor/.virtualenvs/hugeface/lib/python2.6/site-packages/suds/xsd/sxbasic.py", line 63, in resolve
    raise TypeNotFound(qref)
TypeNotFound: Type not found: '(AuthenticatedToken, http://authentication.integration.crowd.atlassian.com, )'

I've tried to both binding and doctors to fix this problem to no avail. Neither approach resulted in any change. Any further recommendations or suggestions would be incredibly helpful.

+1  A: 

There is a patch for the Crowd WSDL here:

http://jira.atlassian.com/browse/CWD-159

cmclaughlin