KenyaDonDraper / pysimplesoap

Automatically exported from code.google.com/p/pysimplesoap
0 stars 0 forks source link

the client cannot use urllib2, instead of httplib2 #75

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. use a clean installed python 2.7 (i did under windows 7)
2. don't install httplib2 (I have just pip and pysimplesoap installed)
3. when you call SoapClient class, it raises error, because TIMEOUT is set to 
60, and before calling urllib2, it raises RuntimeError('timeout is not 
supported with urllib2 transport') whithin transport.py
4- if you set timeout to None (in soapclient.py) it raised another error 
somewhere else. I didn't investigate furthermore.

I used pysimplesoap1.05a, under win7, python 2.7.

when I installed httplib2, the problem was resolved.

Original issue reported on code.google.com by MKaj...@gmail.com on 27 Jul 2012 at 6:17

GoogleCodeExporter commented 9 years ago
I called SoapClient in the following syntax:
'''
soapclient = SoapClient(
    location = 'http://localhost/otrs/nph-genericinterface.pl/Webservice/soap',
    action = 'http://localhost/otrs/nph-genericinterface.pl/Webservice/soap',
    namespace = 'somenamespace',
    soap_ns='soap', trace = True, ns = False, exceptions=True)
'''

Original comment by MKaj...@gmail.com on 27 Jul 2012 at 6:24

GoogleCodeExporter commented 9 years ago
Mkajbaf: can you test the latest version from the repository (1.07)
There are many changes that aren't released yet (pysimplesoap 1.05 is old)
I'll release a more recent version ASAP

Original comment by reingart@gmail.com on 28 Jul 2012 at 12:38

GoogleCodeExporter commented 9 years ago
Tested with a fresh clone from the repository. Still fails

Traceback (most recent call last):
  File "./list-meetings.py", line 17, in <module>
    response = client.getMeetings()
  File "/home/stbot/runtime.dev/pysimplesoap/client.py", line 145, in <lambda>
    return lambda self=self, *args, **kwargs: self.call(attr,*args,**kwargs)
  File "/home/stbot/runtime.dev/pysimplesoap/client.py", line 219, in call
    raise SoapFault(unicode(response.faultcode), unicode(response.faultstring))
pysimplesoap.client.SoapFault: Client.TypeError: 'NoneType' object is not 
callable

Original comment by fgime...@gmail.com on 29 Nov 2012 at 1:00

GoogleCodeExporter commented 9 years ago
You have to remove TIMEOUT declared at top of client.py (line# 20) and need to 
add below import

from transport import TIMEOUT

It will resolve this issue.

Original comment by pvshew...@gmail.com on 13 Feb 2013 at 8:57

GoogleCodeExporter commented 9 years ago
this seems to be fixed (TIMEOUT is removed if httplib2 is not available)

Please download and test the latest source code from the repository until the 
release:

https://pysimplesoap.googlecode.com/archive/default.zip

Original comment by reingart@gmail.com on 22 Jan 2014 at 3:25