Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I had the same problem. To troubleshoot the problem, I turned on full suds logging:</p> <pre><code>logging.basicConfig(level=logging.INFO) logging.getLogger("suds.client").setLevel(logging.DEBUG) logging.getLogger("suds.transport").setLevel(logging.DEBUG) logging.getLogger("suds.xsd.schema").setLevel(logging.DEBUG) logging.getLogger("suds.wsdl").setLevel(logging.DEBUG) </code></pre> <p>With the debugging output, I noticed that the error occured when SUDS tried to download <a href="http://www.w3.org/2001/xml.xsd">http://www.w3.org/2001/xml.xsd</a> (that particular schema was in some way referenced by the service I was trying to call). Turns out that the w3.org server is very overloaded (<a href="http://lists.w3.org/Archives/Public/site-comments/2011Apr/0026.html">link</a>, <a href="http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic/">link</a>).</p> <p>The SUDS <code>Client</code> can be configured to use a cache. I implemented a cache object that returns the contents of two w3.org URLs that SUDS was hitting (you can find the URLs in the log output). I used a browser to fetch the two schemas and save them to disk and then put the contents as string contstants inside a source code file.</p> <pre><code>from suds.cache import NoCache from suds.sax.parser import Parser class StaticSudsCache(NoCache): def get(self, id): STATIC = {"http://www.w3.org/2001/xml.xsd": XML_XSD, "http://www.w3.org/2001/XMLSchema.xsd": XMLSCHEMA_XSD } xml_string = STATIC.get(id.name) if xml_string: p = Parser() return p.parse(string=xml_string) from suds.client import Client c = Client(service_url, cache=StaticSudsCache()) XML_XSD = """... contents from file ...""" XMLSCHEMA_XSD = """... contents from file ...""" </code></pre> <p>The full code including the XML schema content is <a href="https://gist.github.com/1497343/">here</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload