<br><div class="gmail_quote">I&#39;m trying to use SABRE travel web services with Python Suds 0.3.6, but one XSD seems not well-formed (maybe namespace is missing in this schema).<br><br><span style="font-family: courier new,monospace;">from suds.client import Client</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">wsdl = &#39;<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl</a>&#39;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">client = Client(wsdl, cache=None)</span><br><br>Debug trace returns :<br><br><span style="font-family: courier new,monospace;">.DEBUG:suds.wsdl:reading wsdl at: <a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl</a> ...</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.transport.http:opening (<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl</a>)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.metrics:sax (<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl</a>) duration: 406 (ms)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.xsd.sxbasic:Import:0x7f90196fd5f0, importing ns=&quot;<a href="http://webservices.sabre.com/sabreXML/2003/07" target="_blank">http://webservices.sabre.com/sabreXML/2003/07</a>&quot;, location=&quot;OTA_AirPriceLLSRQRS.xsd&quot;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.transport.http:opening (<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQRS.xsd" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQRS.xsd</a>)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.metrics:sax (<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQRS.xsd" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQRS.xsd</a>) duration: 504 (ms)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.xsd.sxbasic:Include:0x7f90196fdf80, importing ns=&quot;None&quot;, location=&quot;OTA_AirPriceLLSRQ.xsd&quot;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.transport.http:opening (<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd</a>)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.metrics:sax (<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd</a>) duration: 1.363 (seconds)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.xsd.schema:built:</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">Schema:0x7f9019708e60</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">(...)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">DEBUG:suds.xsd.query:(u&#39;MessageHeader&#39;, <a href="http://www.ebxml.org/namespaces/messageHeader" target="_blank">http://www.ebxml.org/namespaces/messageHeader</a>), found as: &lt;Element:0x1f68dd0 name=&quot;MessageHeader&quot; /&gt;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.xsd.query:(u&#39;Security&#39;, <a href="http://schemas.xmlsoap.org/ws/2002/12/secext" target="_blank">http://schemas.xmlsoap.org/ws/2002/12/secext</a>), found as: &lt;Element:0x21a3a28 name=&quot;Security&quot; /&gt;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.xsd.query:(u&#39;OTA_AirPriceRQ&#39;, <a href="http://webservices.sabre.com/sabreXML/2003/07" target="_blank">http://webservices.sabre.com/sabreXML/2003/07</a>), not-found</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">.</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">----------------------------------------------------------------------</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">Ran 2 tests in 11.669s</span><br><br>Type not found: &#39;(OTA_AirPriceRQ, <a href="http://webservices.sabre.com/sabreXML/2003/07" target="_blank">http://webservices.sabre.com/sabreXML/2003/07</a>, )&#39;<br>

<br>It&#39;s logic : Python Suds loads OTA_AirPriceRQ in a &quot;None&quot; namespace.<br>I read &quot;fix broken schema&quot; Python Suds documentation (<a href="https://fedorahosted.org/suds/wiki/Documentation#FIXINGBROKENSCHEMAs" target="_blank">https://fedorahosted.org/suds/wiki/Documentation#FIXINGBROKENSCHEMAs</a>):<br>

<br><span style="font-family: courier new,monospace;">from suds.client import Client</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">from suds.xsd.doctor import ImportDoctor, Import</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">wsdl = &#39;<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl</a>&#39;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">imp = Import(&#39;<a href="http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ" target="_blank">http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ</a>&#39;, &#39;<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd</a>&#39;)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">d = ImportDoctor(imp)</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">client = Client(wsdl, cache=None, doctor=d)</span><br>

<br>But script return another exception :<br><span style="font-family: courier new,monospace;">.DEBUG:suds.wsdl:reading wsdl at: <a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl</a> ...</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.transport.http:opening (<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl</a>)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.metrics:sax (<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.wsdl</a>) duration: 617 (ms)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.xsd.doctor:inserting: &lt;xs:import xmlns:xs=&quot;<a href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a>&quot; namespace=&quot;<a href="http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ" target="_blank">http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ</a>&quot; schemaLocation=&quot;<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd</a>&quot;/&gt;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.xsd.sxbasic:Import:0xe6cf80, importing ns=&quot;<a href="http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ" target="_blank">http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ</a>&quot;, location=&quot;<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd</a>&quot;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.transport.http:opening (<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd</a>)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.metrics:sax (<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd</a>) duration: 1.375 (seconds)</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">DEBUG:suds.xsd.doctor:inserting: &lt;xs:import xmlns:xs=&quot;<a href="http://www.w3.org/2001/XMLSchema" target="_blank">http://www.w3.org/2001/XMLSchema</a>&quot; namespace=&quot;<a href="http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ" target="_blank">http://webservices.sabre.com/sabreXML/2003/07/OTA_AirPriceLLSRQ</a>&quot; schemaLocation=&quot;<a href="http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd" target="_blank">http://webservices.sabre.com/wsdl/sabreXML1.0.00/tpf/OTA_AirPriceLLSRQ.xsd</a>&quot;/&gt;</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">(...)</span><br>Error maximum recursion depth exceeded while calling a Python object<br><br><br>I don&#39;t understand how to use &quot;doctor&quot; functions. Somebody can help me, please ?<br>

Thank you.<br><br><br>
</div><br>