[Fedora-suds-list] Sporadic Client Creation

Matt C mcauthorn at gmail.com
Sat Oct 1 15:20:16 UTC 2011


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've loaded some fairly large WSDLs and it's never taken it a minute...

On Wed, Sep 21, 2011 at 12:06 PM, Joshua J. Kugler <joshua at eeinternet.com>wrote:

> On Wednesday, September 21, 2011, Craig Kost elucidated thus:
> > Hello,
> >
> > Python 2.7.1
> > Suds 0.4
> > Windows XP SP3
> >
> > I have been using the suds client (suds.client.Client) for testing
> > some SOAP interfaces and I have recently come across some
> > unpredictable behaviour.
> >
> > Basically what is happening is I am *sometimes (more often than not)*
> > unable to create a client from WSDL source.
> >
> > I guess an example would better shed light on what I mean.
> >
> > For example I run the following
> >
> > >>> from suds.client import Client
> > >>> client = Client("http://localhost:8000/sms/soap/?wsdl")
> >
> > and I get this traceback
> <snip>
> >   File "C:\Python27\lib\urllib2.py", line 1157, in do_open
> >     r = h.getresponse(buffering=True)
> >   File "C:\Python27\lib\httplib.py", line 1013, in getresponse
> >     response.begin()
> >   File "C:\Python27\lib\httplib.py", line 402, in begin
> >     version, status, reason = self._read_status()
> >   File "C:\Python27\lib\httplib.py", line 366, in _read_status
> >     raise BadStatusLine(line)
> > BadStatusLine: ''
> >
> > I can later call* the same* client creation code and successfully
> > create a usable client.
>
> Since the error is being raised in httplib, it would seem your web
> server is not responding correctly (bad status line).  I would try doing
> several test calls with just httplib (or urllib2) against this same URL
> and see if you can replicate the error.
>
> > One last thing. Is there anyway to speed up the creation of the
> > clients. Sometimes for a simple WSDL it takes up to 1 minute to
> > create a client...
>
> Define "simple." :) I've used some pretty complex WSDL files, and it's
> never taken as long as a minute.  The Sax parser is pure python, so it
> might not be the fastest thing out there.  Also, look into the caching
> options.
>
> j
>
> --
> Joshua Kugler
> Part-Time System Admin/Programmer
> http://www.eeinternet.com - Fairbanks, AK
> PGP Key: http://pgp.mit.edu/  ID 0x73B13B6A
> _______________________________________________
> suds mailing list
> suds at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/suds
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/suds/attachments/20111001/c7a8688e/attachment.html 


More information about the suds mailing list