问题
I'm in the process of invoking a documentum webservice for which I am starting with a simple code:
from suds.client import Client #@UnresolvedImport
from suds.transport.https import HttpAuthenticated
import urllib2
t=HttpAuthenticated(username='x', password='x')
t.handler = urllib2.HTTPBasicAuthHandler(t.pm)
t.urlopener = urllib2.build_opener(t.handler)
url = 'http://hudt17:8888/services/core/ObjectService?wsdl'
client = Client(url,transport=t)
print client
It works fine if url='http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl'
. But I have this error thrown back to me if it's not:
https://docs.google.com/document/pub?id=1Qk8_qji385B9fZB-z4eMbPc1fv1AXVKEtbxr7Xx6AvQ
What is going on here?
回答1:
There is a patch for this issue:
https://fedorahosted.org/suds/attachment/ticket/239/recurselevel-schema.py.patch
Click on the Original Format link at the bottom of the page. You can then apply the patch using:
patch schema.py < recurselevel-schema.py.patch
Then install from the suds source top level dir using:
easy_install .
回答2:
You are referencing an XSD schema which refers to itself.
Or which refers to another schema which refers to the first one.
In any case one or more schemas which have a circular dependence.
回答3:
This is considered a blocking bug on the Suds issue tracker: https://fedorahosted.org/suds/ticket/239
Unfortunately, this issue has been open for more than 3 years, as of 2012.
回答4:
I have run into the same issue consuming a huge wsdl with multiple includes and circular calls. The 0.6 version of suds-jurko does not support this, but the current developers cut v0.7 seems to solve this issue.
Download latest zip and extract: (Find the tip tag, or latest tag or branch) https://bitbucket.org/jurko/suds/downloads
Install:
$ sudo easy_install .
Verify:
$ pip freeze
Should show:
suds-jurko==0.7.dev0
来源:https://stackoverflow.com/questions/5742808/python-suds-showing-the-following-issues-runtimeerror-maximum-recursion-depth