Slow client creation times may also point to external imports that take time to resolve, load, parse, or connect to. I would run a packet capture while you instantiate your client so you can see exactly what may be going on. I&#39;ve loaded some fairly large WSDLs and it&#39;s never taken it a minute...<br>
<br><div class="gmail_quote">On Wed, Sep 21, 2011 at 12:06 PM, Joshua J. Kugler <span dir="ltr">&lt;<a href="mailto:joshua@eeinternet.com">joshua@eeinternet.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Wednesday, September 21, 2011, Craig Kost elucidated thus:<br>
<div class="im">&gt; Hello,<br>
&gt;<br>
&gt; Python 2.7.1<br>
&gt; Suds 0.4<br>
&gt; Windows XP SP3<br>
&gt;<br>
&gt; I have been using the suds client (suds.client.Client) for testing<br>
&gt; some SOAP interfaces and I have recently come across some<br>
&gt; unpredictable behaviour.<br>
&gt;<br>
</div>&gt; Basically what is happening is I am *sometimes (more often than not)*<br>
<div class="im">&gt; unable to create a client from WSDL source.<br>
&gt;<br>
&gt; I guess an example would better shed light on what I mean.<br>
&gt;<br>
&gt; For example I run the following<br>
&gt;<br>
&gt; &gt;&gt;&gt; from suds.client import Client<br>
&gt; &gt;&gt;&gt; client = Client(&quot;<a href="http://localhost:8000/sms/soap/?wsdl" target="_blank">http://localhost:8000/sms/soap/?wsdl</a>&quot;)<br>
&gt;<br>
&gt; and I get this traceback<br>
</div>&lt;snip&gt;<br>
<div class="im">&gt;   File &quot;C:\Python27\lib\urllib2.py&quot;, line 1157, in do_open<br>
&gt;     r = h.getresponse(buffering=True)<br>
&gt;   File &quot;C:\Python27\lib\httplib.py&quot;, line 1013, in getresponse<br>
&gt;     response.begin()<br>
&gt;   File &quot;C:\Python27\lib\httplib.py&quot;, line 402, in begin<br>
&gt;     version, status, reason = self._read_status()<br>
&gt;   File &quot;C:\Python27\lib\httplib.py&quot;, line 366, in _read_status<br>
&gt;     raise BadStatusLine(line)<br>
&gt; BadStatusLine: &#39;&#39;<br>
&gt;<br>
</div>&gt; I can later call* the same* client creation code and successfully<br>
&gt; create a usable client.<br>
<br>
Since the error is being raised in httplib, it would seem your web<br>
server is not responding correctly (bad status line).  I would try doing<br>
several test calls with just httplib (or urllib2) against this same URL<br>
and see if you can replicate the error.<br>
<div class="im"><br>
&gt; One last thing. Is there anyway to speed up the creation of the<br>
&gt; clients. Sometimes for a simple WSDL it takes up to 1 minute to<br>
&gt; create a client...<br>
<br>
</div>Define &quot;simple.&quot; :) I&#39;ve used some pretty complex WSDL files, and it&#39;s<br>
never taken as long as a minute.  The Sax parser is pure python, so it<br>
might not be the fastest thing out there.  Also, look into the caching<br>
options.<br>
<br>
j<br>
<font color="#888888"><br>
--<br>
Joshua Kugler<br>
Part-Time System Admin/Programmer<br>
<a href="http://www.eeinternet.com" target="_blank">http://www.eeinternet.com</a> - Fairbanks, AK<br>
PGP Key: <a href="http://pgp.mit.edu/" target="_blank">http://pgp.mit.edu/</a>  ID 0x73B13B6A<br>
_______________________________________________<br>
suds mailing list<br>
<a href="mailto:suds@lists.fedoraproject.org">suds@lists.fedoraproject.org</a><br>
<a href="https://admin.fedoraproject.org/mailman/listinfo/suds" target="_blank">https://admin.fedoraproject.org/mailman/listinfo/suds</a><br>
</font></blockquote></div><br>