Hi all,
I'm trying to access to: url="https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl" to have the wsdl but it requires an authentication.
cl = Client(url) suds.transport.TransportError: HTTP Error 401: Authorization Required
I tried too: cl = Client(url, username='us',password='pwd')
wiyhout success.
Could someone tell me how to access to this authenticated url to download the wsdl like lynx do?
lynx -source -auth=us:pwd https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl
thanks.
-- j
Hi, if the WSDL doesn't change frequently, you should just download it with the HTTP client of your choice, and instantiate the Client object with a local file name. The WSDL still containts the endpoint URL, so it won't mess up the invocation part, which will use the credentials you provided.
Regards, András Veres-Szentkirályi
2011. december 17. szombat 08:30:42 dátummal jo ezt írta:
Hi all,
I'm trying to access to: url="https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl" to have the wsdl but it requires an authentication.
cl = Client(url) suds.transport.TransportError: HTTP Error 401: Authorization Required
I tried too: cl = Client(url, username='us',password='pwd')
wiyhout success.
Could someone tell me how to access to this authenticated url to download the wsdl like lynx do?
lynx -source -auth=us:pwd https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl
thanks.
Is there another way? suds can't do that? I did not want to use lynx or another browser to do this job.
j
Veres-Szentkiralyi Andras wrote:
Hi, if the WSDL doesn't change frequently, you should just download it with the HTTP client of your choice, and instantiate the Client object with a local file name. The WSDL still containts the endpoint URL, so it won't mess up the invocation part, which will use the credentials you provided.
Regards, András Veres-Szentkirályi
- december 17. szombat 08:30:42 dátummal jo ezt írta:
Hi all,
I'm trying to access to: url="https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl" to have the wsdl but it requires an authentication.
cl = Client(url) suds.transport.TransportError: HTTP Error 401: Authorization Required
I tried too: cl = Client(url, username='us',password='pwd')
wiyhout success.
Could someone tell me how to access to this authenticated url to download the wsdl like lynx do?
lynx -source -auth=us:pwd https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl
thanks.
suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
Hi.
I'm trying to access to: url="https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl" to have the wsdl but it requires an authentication.
cl = Client(url) suds.transport.TransportError: HTTP Error 401: Authorization Required
I tried too: cl = Client(url, username='us',password='pwd')
wiyhout success.
Could someone tell me how to access to this authenticated url to download the wsdl like lynx do?
lynx -source -auth=us:pwd https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl
If you provide some sort of a username and password someone could possibly test this. Also, you did not provide the exact code you tried or say what exactly went wrong when you 'tried without success'.
I tried just now and running:
url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" suds.client.Client(url)
raises an expected exception:
suds.transport.TransportError: HTTP Error 401: Authorization Required
while running:
url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" suds.client.Client(url, username="us", password="pwd")
raises an expected exception:
suds.transport.TransportError: HTTP Error 401: basic auth failed
since presumably user name "us" and password "pwd" are not correct.
Try to connect to the same URL using urllib. If you can do that - then suds should be able to connect to it as well (since it uses urllib under the hood).
Hope this helps.
Best regards, Jurko Gospodnetić
Jurko Gospodnetić wrote:
Hi.
I'm trying to access to: url="https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl" to have the wsdl but it requires an authentication.
cl = Client(url) suds.transport.TransportError: HTTP Error 401: Authorization Required
I tried too: cl = Client(url, username='us',password='pwd')
wiyhout success.
Could someone tell me how to access to this authenticated url to download the wsdl like lynx do?
lynx -source -auth=us:pwd https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl
If you provide some sort of a username and password someone could possibly test this. Also, you did not provide the exact code you tried or say what exactly went wrong when you 'tried without success'.
I tried just now and running:
url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" suds.client.Client(url)
raises an expected exception:
suds.transport.TransportError: HTTP Error 401: Authorization Required
while running:
url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" suds.client.Client(url, username="us", password="pwd")
raises an expected exception:
suds.transport.TransportError: HTTP Error 401: basic auth failed
the correct url is: url = 'https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl' suds.client.Client(url=url, username="us", password="pwd")
and for me it returns a RuntimeError: maximum recursion depth exceeded error when using username and password. Even with real username and password (I'm sorry but I can't reveal the real credentials because this is a production site). mi version is:
suds.__version__
'0.4'
File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in <lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
since presumably user name "us" and password "pwd" are not correct.
Try to connect to the same URL using urllib. If you can do that - then suds should be able to connect to it as well (since it uses urllib under the hood).
Hope this helps.
Best regards, Jurko Gospodnetić _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
On 21/12/11 08:29, jo wrote:
Jurko Gospodnetić wrote:
Hi.
I'm trying to access to: url="https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl" to have the wsdl but it requires an authentication.
cl = Client(url) suds.transport.TransportError: HTTP Error 401: Authorization Required
I tried too: cl = Client(url, username='us',password='pwd')
wiyhout success.
Could someone tell me how to access to this authenticated url to download the wsdl like lynx do?
lynx -source -auth=us:pwd https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl
If you provide some sort of a username and password someone could possibly test this. Also, you did not provide the exact code you tried or say what exactly went wrong when you 'tried without success'.
I tried just now and running:
url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" suds.client.Client(url)
raises an expected exception:
suds.transport.TransportError: HTTP Error 401: Authorization Required
while running:
url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" suds.client.Client(url, username="us", password="pwd")
raises an expected exception:
suds.transport.TransportError: HTTP Error 401: basic auth failed
the correct url is: url = 'https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl' suds.client.Client(url=url, username="us", password="pwd")
and for me it returns a RuntimeError: maximum recursion depth exceeded error when using username and password. Even with real username and password (I'm sorry but I can't reveal the real credentials because this is a production site). mi version is:
suds.__version__
'0.4'
File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in <lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
since presumably user name "us" and password "pwd" are not correct.
Try to connect to the same URL using urllib. If you can do that - then suds should be able to connect to it as well (since it uses urllib under the hood).
Hope this helps.
Best regards, Jurko Gospodnetić _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
Well, with your given url (and fake username and password) i am getting a "TransportError: HTTP Error 401: basic auth failed".
So i assume that the transport layer works correctly.
I have tested this with suds version 0.3.9 + 0.4 + 0.4.1. Unless you provide someone with the real credentials - there is nothing more to say.
Hey, perhaps you can change the credentials for a "public" test (you pick someone from the list, change the credentials for this person and this person can try it, after that - just change the credentials back).
cheers, robin
Robin Wittler wrote:
On 21/12/11 08:29, jo wrote:
Jurko Gospodnetić wrote:
Hi.
I'm trying to access to: url="https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl" to have the wsdl but it requires an authentication.
cl = Client(url) suds.transport.TransportError: HTTP Error 401: Authorization Required
I tried too: cl = Client(url, username='us',password='pwd')
wiyhout success.
Could someone tell me how to access to this authenticated url to download the wsdl like lynx do?
lynx -source -auth=us:pwd https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl
If you provide some sort of a username and password someone could possibly test this. Also, you did not provide the exact code you tried or say what exactly went wrong when you 'tried without success'.
I tried just now and running:
url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" suds.client.Client(url)
raises an expected exception:
suds.transport.TransportError: HTTP Error 401: Authorization Required
while running:
url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" suds.client.Client(url, username="us", password="pwd")
raises an expected exception:
suds.transport.TransportError: HTTP Error 401: basic auth failed
the correct url is: url = 'https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl' suds.client.Client(url=url, username="us", password="pwd")
and for me it returns a RuntimeError: maximum recursion depth exceeded error when using username and password. Even with real username and password (I'm sorry but I can't reveal the real credentials because this is a production site). mi version is:
suds.__version__
'0.4'
File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in <lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
since presumably user name "us" and password "pwd" are not correct.
Try to connect to the same URL using urllib. If you can do that - then suds should be able to connect to it as well (since it uses urllib under the hood).
Hope this helps.
Best regards, Jurko Gospodnetić _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
Well, with your given url (and fake username and password) i am getting a "TransportError: HTTP Error 401: basic auth failed".
So i assume that the transport layer works correctly.
I have tested this with suds version 0.3.9 + 0.4 + 0.4.1. Unless you provide someone with the real credentials - there is nothing more to say.
Hey, perhaps you can change the credentials for a "public" test (you pick someone from the list, change the credentials for this person and this person can try it, after that - just change the credentials back).
cheers, robin _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
The problem here is not the credentials, Robin. I don't know why you have a different response from me, even using the fake credentials.
The following two rows :
from suds.client import Client Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl', username="us", password="pwd")
don't giveme a 401 error but this result instead:
Traceback (most recent call last): File "o", line 2, in <module> Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl', username="us", password="pwd") File "build/bdist.linux-x86_64/egg/suds/client.py", line 112, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 152, in open File "build/bdist.linux-x86_64/egg/suds/wsdl.py", line 136, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 79, in open File "build/bdist.linux-x86_64/egg/suds/reader.py", line 95, in download File "build/bdist.linux-x86_64/egg/suds/transport/https.py", line 60, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 62, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 118, in u2open File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response) -------------------------------------------------------------------------------- LOOP 107 TIMES ------------------------ File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 391, in open response = self._open(req, data) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in <lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
On 21/12/11 10:54, jose soares wrote:
Robin Wittler wrote:
On 21/12/11 08:29, jo wrote:
Jurko Gospodnetić wrote:
Hi.
I'm trying to access to: url="https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl"
to have the wsdl but it requires an authentication.
cl = Client(url) suds.transport.TransportError: HTTP Error 401: Authorization Required
I tried too: cl = Client(url, username='us',password='pwd')
wiyhout success.
Could someone tell me how to access to this authenticated url to download the wsdl like lynx do?
lynx -source -auth=us:pwd https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl
If you provide some sort of a username and password someone could possibly test this. Also, you did not provide the exact code you tried or say what exactly went wrong when you 'tried without success'. I tried just now and running:
url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" suds.client.Client(url)
raises an expected exception:
suds.transport.TransportError: HTTP Error 401: Authorization Required
while running:
url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" suds.client.Client(url, username="us", password="pwd")
raises an expected exception:
suds.transport.TransportError: HTTP Error 401: basic auth failed
the correct url is: url = 'https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl' suds.client.Client(url=url, username="us", password="pwd")
and for me it returns a RuntimeError: maximum recursion depth exceeded error when using username and password. Even with real username and password (I'm sorry but I can't reveal the real credentials because this is a production site). mi version is:
suds.__version__
'0.4'
File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in
<lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
since presumably user name "us" and password "pwd" are not correct.
Try to connect to the same URL using urllib. If you can do that - then suds should be able to connect to it as well (since it uses urllib under the hood).
Hope this helps.
Best regards, Jurko Gospodnetić _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
Well, with your given url (and fake username and password) i am getting a "TransportError: HTTP Error 401: basic auth failed".
So i assume that the transport layer works correctly.
I have tested this with suds version 0.3.9 + 0.4 + 0.4.1. Unless you provide someone with the real credentials - there is nothing more to say.
Hey, perhaps you can change the credentials for a "public" test (you pick someone from the list, change the credentials for this person and this person can try it, after that - just change the credentials back).
cheers, robin _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
The problem here is not the credentials, Robin. I don't know why you have a different response from me, even using the fake credentials.
The following two rows :
from suds.client import Client Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl', username="us", password="pwd")
don't giveme a 401 error but this result instead:
Traceback (most recent call last): File "o", line 2, in <module> Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl', username="us", password="pwd") File "build/bdist.linux-x86_64/egg/suds/client.py", line 112, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 152, in open File "build/bdist.linux-x86_64/egg/suds/wsdl.py", line 136, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 79, in open File "build/bdist.linux-x86_64/egg/suds/reader.py", line 95, in download File "build/bdist.linux-x86_64/egg/suds/transport/https.py", line 60, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 62, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 118, in u2open File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response)
LOOP 107 TIMES ------------------------ File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 391, in open response = self._open(req, data) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in <lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
Well, i can not reproduce the error (and now i also test it with suds 0.4.2). I suggest you read about how to do logging in suds:
https://fedorahosted.org/suds/wiki/Documentation#LOGGING
and provide us with more information.
cheers, robin
Robin Wittler wrote:
On 21/12/11 10:54, jose soares wrote:
Robin Wittler wrote:
On 21/12/11 08:29, jo wrote:
Jurko Gospodnetić wrote:
Hi.
I'm trying to access to: url="https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl"
to have the wsdl but it requires an authentication.
cl = Client(url) suds.transport.TransportError: HTTP Error 401: Authorization Required
I tried too: cl = Client(url, username='us',password='pwd')
wiyhout success.
Could someone tell me how to access to this authenticated url to download the wsdl like lynx do?
lynx -source -auth=us:pwd https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl
If you provide some sort of a username and password someone could possibly test this. Also, you did not provide the exact code you tried or say what exactly went wrong when you 'tried without success'. I tried just now and running:
url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" suds.client.Client(url)
raises an expected exception:
suds.transport.TransportError: HTTP Error 401: Authorization Required
while running:
url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" suds.client.Client(url, username="us", password="pwd")
raises an expected exception:
suds.transport.TransportError: HTTP Error 401: basic auth failed
the correct url is: url = 'https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl' suds.client.Client(url=url, username="us", password="pwd")
and for me it returns a RuntimeError: maximum recursion depth exceeded error when using username and password. Even with real username and password (I'm sorry but I can't reveal the real credentials because this is a production site). mi version is:
> suds.__version__ > >
'0.4'
File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in
<lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
since presumably user name "us" and password "pwd" are not correct.
Try to connect to the same URL using urllib. If you can do that - then suds should be able to connect to it as well (since it uses urllib under the hood).
Hope this helps.
Best regards, Jurko Gospodnetić _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
Well, with your given url (and fake username and password) i am getting a "TransportError: HTTP Error 401: basic auth failed".
So i assume that the transport layer works correctly.
I have tested this with suds version 0.3.9 + 0.4 + 0.4.1. Unless you provide someone with the real credentials - there is nothing more to say.
Hey, perhaps you can change the credentials for a "public" test (you pick someone from the list, change the credentials for this person and this person can try it, after that - just change the credentials back).
cheers, robin _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
The problem here is not the credentials, Robin. I don't know why you have a different response from me, even using the fake credentials.
The following two rows :
from suds.client import Client Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl', username="us", password="pwd")
don't giveme a 401 error but this result instead:
Traceback (most recent call last): File "o", line 2, in <module> Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl', username="us", password="pwd") File "build/bdist.linux-x86_64/egg/suds/client.py", line 112, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 152, in open File "build/bdist.linux-x86_64/egg/suds/wsdl.py", line 136, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 79, in open File "build/bdist.linux-x86_64/egg/suds/reader.py", line 95, in download File "build/bdist.linux-x86_64/egg/suds/transport/https.py", line 60, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 62, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 118, in u2open File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response)
LOOP 107 TIMES ------------------------ File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 391, in open response = self._open(req, data) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in <lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
Well, i can not reproduce the error (and now i also test it with suds 0.4.2). I suggest you read about how to do logging in suds:
https://fedorahosted.org/suds/wiki/Documentation#LOGGING
and provide us with more information.
with logging in DEBUG level there are only two added rows at the top of traceback :
DEBUG:suds.wsdl:reading wsdl at: https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl ... DEBUG:suds.transport.http:opening (https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl) Traceback (most recent call last): File "o", line 2, in <module> Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl%27,userna...", password="pwd") .... <I avoid to put here the rest of the traceback because it is exactly like before>
import logging logging.basicConfig(level=logging.DEBUG) logging.getLogger('suds.client').setLevel(logging.DEBUG) (I also tried suds.transport and suds.wsdl with the same result) from suds.client import Client Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl', username="us", password="pwd")
On 21/12/11 11:45, jose soares wrote:
Robin Wittler wrote:
On 21/12/11 10:54, jose soares wrote:
Robin Wittler wrote:
On 21/12/11 08:29, jo wrote:
Jurko Gospodnetić wrote:
Hi.
> I'm trying to access to: > url="https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl" > > > to have the wsdl but it requires an authentication. > > cl = Client(url) > suds.transport.TransportError: HTTP Error 401: Authorization > Required > > I tried too: > cl = Client(url, username='us',password='pwd') > > wiyhout success. > > Could someone tell me how to access to this authenticated url to > download the wsdl like lynx do? > > lynx -source -auth=us:pwd > https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl > If you provide some sort of a username and password someone could possibly test this. Also, you did not provide the exact code you tried or say what exactly went wrong when you 'tried without success'. I tried just now and running:
> url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" > suds.client.Client(url) > raises an expected exception:
> suds.transport.TransportError: HTTP Error 401: Authorization > Required > while running:
> url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" > suds.client.Client(url, username="us", password="pwd") > raises an expected exception:
> suds.transport.TransportError: HTTP Error 401: basic auth failed >
the correct url is: url = 'https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl' suds.client.Client(url=url, username="us", password="pwd")
and for me it returns a RuntimeError: maximum recursion depth exceeded error when using username and password. Even with real username and password (I'm sorry but I can't reveal the real credentials because this is a production site). mi version is:
>> suds.__version__ >>
'0.4'
File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in
<lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
since presumably user name "us" and password "pwd" are not correct.
Try to connect to the same URL using urllib. If you can do that - then suds should be able to connect to it as well (since it uses urllib under the hood).
Hope this helps.
Best regards, Jurko Gospodnetić _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
Well, with your given url (and fake username and password) i am getting a "TransportError: HTTP Error 401: basic auth failed".
So i assume that the transport layer works correctly.
I have tested this with suds version 0.3.9 + 0.4 + 0.4.1. Unless you provide someone with the real credentials - there is nothing more to say.
Hey, perhaps you can change the credentials for a "public" test (you pick someone from the list, change the credentials for this person and this person can try it, after that - just change the credentials back).
cheers, robin _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
The problem here is not the credentials, Robin. I don't know why you have a different response from me, even using the fake credentials.
The following two rows :
from suds.client import Client Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl',
username="us", password="pwd")
don't giveme a 401 error but this result instead:
Traceback (most recent call last): File "o", line 2, in <module> Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl',
username="us", password="pwd") File "build/bdist.linux-x86_64/egg/suds/client.py", line 112, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 152, in open File "build/bdist.linux-x86_64/egg/suds/wsdl.py", line 136, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 79, in open File "build/bdist.linux-x86_64/egg/suds/reader.py", line 95, in download File "build/bdist.linux-x86_64/egg/suds/transport/https.py", line 60, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 62, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 118, in u2open File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response)
LOOP 107 TIMES ------------------------ File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 391, in open response = self._open(req, data) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in <lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
Well, i can not reproduce the error (and now i also test it with suds 0.4.2). I suggest you read about how to do logging in suds:
https://fedorahosted.org/suds/wiki/Documentation#LOGGING
and provide us with more information.
with logging in DEBUG level there are only two added rows at the top of traceback :
DEBUG:suds.wsdl:reading wsdl at: https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl ... DEBUG:suds.transport.http:opening (https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl) Traceback (most recent call last): File "o", line 2, in <module> Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl%27,userna...", password="pwd") .... <I avoid to put here the rest of the traceback because it is exactly like before>
import logging logging.basicConfig(level=logging.DEBUG) logging.getLogger('suds.client').setLevel(logging.DEBUG) (I also tried suds.transport and suds.wsdl with the same result) from suds.client import Client Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl', username="us", password="pwd")
Ok, you can fetch the wsdl - but it looks like there is some recursive stuff in the wsdl (or xsd). So, without the wsdl (and/or the xsd) no one can help you.
cheers, robin
Here's the wsdl attacched. j Robin Wittler wrote:
On 21/12/11 11:45, jose soares wrote:
Robin Wittler wrote:
On 21/12/11 10:54, jose soares wrote:
Robin Wittler wrote:
On 21/12/11 08:29, jo wrote:
Jurko Gospodnetić wrote:
> Hi. > > > >> I'm trying to access to: >> url="https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl" >> >> >> to have the wsdl but it requires an authentication. >> >> cl = Client(url) >> suds.transport.TransportError: HTTP Error 401: Authorization >> Required >> >> I tried too: >> cl = Client(url, username='us',password='pwd') >> >> wiyhout success. >> >> Could someone tell me how to access to this authenticated url to >> download the wsdl like lynx do? >> >> lynx -source -auth=us:pwd >> https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl >> >> > If you provide some sort of a username and password someone could > possibly test this. Also, you did not provide the exact code you > tried > or say what exactly went wrong when you 'tried without success'. > I tried just now and running: > > >> url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" >> suds.client.Client(url) >> >> > raises an expected exception: > > >> suds.transport.TransportError: HTTP Error 401: Authorization >> Required >> >> > while running: > > >> url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" >> suds.client.Client(url, username="us", password="pwd") >> >> > raises an expected exception: > > >> suds.transport.TransportError: HTTP Error 401: basic auth failed >> >> the correct url is: url = 'https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl' suds.client.Client(url=url, username="us", password="pwd")
and for me it returns a RuntimeError: maximum recursion depth exceeded error when using username and password. Even with real username and password (I'm sorry but I can't reveal the real credentials because this is a production site). mi version is:
>>> suds.__version__ >>> >>> '0.4'
File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in
<lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
> since presumably user name "us" and password "pwd" are not correct. > > Try to connect to the same URL using urllib. If you can do that - > then suds should be able to connect to it as well (since it uses > urllib under the hood). > > Hope this helps. > > Best regards, > Jurko Gospodnetić > _______________________________________________ > suds mailing list > suds@lists.fedoraproject.org > https://admin.fedoraproject.org/mailman/listinfo/suds > >
Well, with your given url (and fake username and password) i am getting a "TransportError: HTTP Error 401: basic auth failed".
So i assume that the transport layer works correctly.
I have tested this with suds version 0.3.9 + 0.4 + 0.4.1. Unless you provide someone with the real credentials - there is nothing more to say.
Hey, perhaps you can change the credentials for a "public" test (you pick someone from the list, change the credentials for this person and this person can try it, after that - just change the credentials back).
cheers, robin _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
The problem here is not the credentials, Robin. I don't know why you have a different response from me, even using the fake credentials.
The following two rows :
from suds.client import Client Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl',
username="us", password="pwd")
don't giveme a 401 error but this result instead:
Traceback (most recent call last): File "o", line 2, in <module> Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl',
username="us", password="pwd") File "build/bdist.linux-x86_64/egg/suds/client.py", line 112, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 152, in open File "build/bdist.linux-x86_64/egg/suds/wsdl.py", line 136, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 79, in open File "build/bdist.linux-x86_64/egg/suds/reader.py", line 95, in download File "build/bdist.linux-x86_64/egg/suds/transport/https.py", line 60, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 62, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 118, in u2open File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response)
LOOP 107 TIMES ------------------------ File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 391, in open response = self._open(req, data) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in <lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
Well, i can not reproduce the error (and now i also test it with suds 0.4.2). I suggest you read about how to do logging in suds:
https://fedorahosted.org/suds/wiki/Documentation#LOGGING
and provide us with more information.
with logging in DEBUG level there are only two added rows at the top of traceback :
DEBUG:suds.wsdl:reading wsdl at: https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl ... DEBUG:suds.transport.http:opening (https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl) Traceback (most recent call last): File "o", line 2, in <module> Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl%27,userna...", password="pwd") .... <I avoid to put here the rest of the traceback because it is exactly like before>
import logging logging.basicConfig(level=logging.DEBUG) logging.getLogger('suds.client').setLevel(logging.DEBUG) (I also tried suds.transport and suds.wsdl with the same result) from suds.client import Client Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl', username="us", password="pwd")
Ok, you can fetch the wsdl - but it looks like there is some recursive stuff in the wsdl (or xsd). So, without the wsdl (and/or the xsd) no one can help you.
cheers, robin _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
Now it works, I'm sorry it was an authentication problem, I didn't have the right credentials. Thanks to everyone who tried to help me. j
Robin Wittler wrote:
On 21/12/11 11:45, jose soares wrote:
Robin Wittler wrote:
On 21/12/11 10:54, jose soares wrote:
Robin Wittler wrote:
On 21/12/11 08:29, jo wrote:
Jurko Gospodnetić wrote:
> Hi. > > > >> I'm trying to access to: >> url="https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl" >> >> >> to have the wsdl but it requires an authentication. >> >> cl = Client(url) >> suds.transport.TransportError: HTTP Error 401: Authorization >> Required >> >> I tried too: >> cl = Client(url, username='us',password='pwd') >> >> wiyhout success. >> >> Could someone tell me how to access to this authenticated url to >> download the wsdl like lynx do? >> >> lynx -source -auth=us:pwd >> https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl >> >> > If you provide some sort of a username and password someone could > possibly test this. Also, you did not provide the exact code you > tried > or say what exactly went wrong when you 'tried without success'. > I tried just now and running: > > >> url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" >> suds.client.Client(url) >> >> > raises an expected exception: > > >> suds.transport.TransportError: HTTP Error 401: Authorization >> Required >> >> > while running: > > >> url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" >> suds.client.Client(url, username="us", password="pwd") >> >> > raises an expected exception: > > >> suds.transport.TransportError: HTTP Error 401: basic auth failed >> >> the correct url is: url = 'https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl' suds.client.Client(url=url, username="us", password="pwd")
and for me it returns a RuntimeError: maximum recursion depth exceeded error when using username and password. Even with real username and password (I'm sorry but I can't reveal the real credentials because this is a production site). mi version is:
>>> suds.__version__ >>> >>> '0.4'
File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in
<lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
> since presumably user name "us" and password "pwd" are not correct. > > Try to connect to the same URL using urllib. If you can do that - > then suds should be able to connect to it as well (since it uses > urllib under the hood). > > Hope this helps. > > Best regards, > Jurko Gospodnetić > _______________________________________________ > suds mailing list > suds@lists.fedoraproject.org > https://admin.fedoraproject.org/mailman/listinfo/suds > >
Well, with your given url (and fake username and password) i am getting a "TransportError: HTTP Error 401: basic auth failed".
So i assume that the transport layer works correctly.
I have tested this with suds version 0.3.9 + 0.4 + 0.4.1. Unless you provide someone with the real credentials - there is nothing more to say.
Hey, perhaps you can change the credentials for a "public" test (you pick someone from the list, change the credentials for this person and this person can try it, after that - just change the credentials back).
cheers, robin _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
The problem here is not the credentials, Robin. I don't know why you have a different response from me, even using the fake credentials.
The following two rows :
from suds.client import Client Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl',
username="us", password="pwd")
don't giveme a 401 error but this result instead:
Traceback (most recent call last): File "o", line 2, in <module> Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl',
username="us", password="pwd") File "build/bdist.linux-x86_64/egg/suds/client.py", line 112, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 152, in open File "build/bdist.linux-x86_64/egg/suds/wsdl.py", line 136, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 79, in open File "build/bdist.linux-x86_64/egg/suds/reader.py", line 95, in download File "build/bdist.linux-x86_64/egg/suds/transport/https.py", line 60, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 62, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 118, in u2open File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response)
LOOP 107 TIMES ------------------------ File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 391, in open response = self._open(req, data) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in <lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
Well, i can not reproduce the error (and now i also test it with suds 0.4.2). I suggest you read about how to do logging in suds:
https://fedorahosted.org/suds/wiki/Documentation#LOGGING
and provide us with more information.
with logging in DEBUG level there are only two added rows at the top of traceback :
DEBUG:suds.wsdl:reading wsdl at: https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl ... DEBUG:suds.transport.http:opening (https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl) Traceback (most recent call last): File "o", line 2, in <module> Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl%27,userna...", password="pwd") .... <I avoid to put here the rest of the traceback because it is exactly like before>
import logging logging.basicConfig(level=logging.DEBUG) logging.getLogger('suds.client').setLevel(logging.DEBUG) (I also tried suds.transport and suds.wsdl with the same result) from suds.client import Client Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl', username="us", password="pwd")
Ok, you can fetch the wsdl - but it looks like there is some recursive stuff in the wsdl (or xsd). So, without the wsdl (and/or the xsd) no one can help you.
cheers, robin _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
On 21/12/11 14:25, jose soares wrote:
Now it works, I'm sorry it was an authentication problem, I didn't have the right credentials. Thanks to everyone who tried to help me. j
Robin Wittler wrote:
On 21/12/11 11:45, jose soares wrote:
Robin Wittler wrote:
On 21/12/11 10:54, jose soares wrote:
Robin Wittler wrote:
On 21/12/11 08:29, jo wrote:
> Jurko Gospodnetić wrote: > >> Hi. >> >> >>> I'm trying to access to: >>> url="https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl" >>> >>> >>> >>> to have the wsdl but it requires an authentication. >>> >>> cl = Client(url) >>> suds.transport.TransportError: HTTP Error 401: Authorization >>> Required >>> >>> I tried too: >>> cl = Client(url, username='us',password='pwd') >>> >>> wiyhout success. >>> >>> Could someone tell me how to access to this authenticated url to >>> download the wsdl like lynx do? >>> >>> lynx -source -auth=us:pwd >>> https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl >>> >> If you provide some sort of a username and password someone could >> possibly test this. Also, you did not provide the exact code you >> tried >> or say what exactly went wrong when you 'tried without success'. >> I tried just now and running: >> >>> url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" >>> suds.client.Client(url) >>> >> raises an expected exception: >> >>> suds.transport.TransportError: HTTP Error 401: Authorization >>> Required >>> >> while running: >> >>> url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" >>> suds.client.Client(url, username="us", password="pwd") >>> >> raises an expected exception: >> >>> suds.transport.TransportError: HTTP Error 401: basic auth failed >>> > the correct url is: > url = > 'https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl' > suds.client.Client(url=url, username="us", password="pwd") > > and for me it returns a RuntimeError: maximum recursion depth > exceeded > error when using username and password. > Even with real username and password (I'm sorry but I can't reveal > the > real credentials because this is a production site). > mi version is: > >>>> suds.__version__ >>>> > '0.4' > > > File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line > 409, in > _open > '_open', req) > File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line > 369, in > _call_chain > result = func(*args) > File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line > 1169, in > https_open > return self.do_open(httplib.HTTPSConnection, req) > File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line > 1134, in > do_open > r = h.getresponse() > File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line > 986, in > getresponse > response.begin() > File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line > 420, in > begin > self.msg = HTTPMessage(self.fp, 0) > File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line > 25, in > __init__ > rfc822.Message.__init__(self, fp, seekable) > File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in > __init__ > self.readheaders() > File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line > 276, in > readheaders > line = self.fp.readline() > File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in > readline > data = recv(1) > File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in > <lambda> > self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, > buflen, > flags) > RuntimeError: maximum recursion depth exceeded > > >> since presumably user name "us" and password "pwd" are not >> correct. >> >> Try to connect to the same URL using urllib. If you can do that - >> then suds should be able to connect to it as well (since it uses >> urllib under the hood). >> >> Hope this helps. >> >> Best regards, >> Jurko Gospodnetić >> _______________________________________________ >> suds mailing list >> suds@lists.fedoraproject.org >> https://admin.fedoraproject.org/mailman/listinfo/suds >> > Well, with your given url (and fake username and password) i am getting a "TransportError: HTTP Error 401: basic auth failed".
So i assume that the transport layer works correctly.
I have tested this with suds version 0.3.9 + 0.4 + 0.4.1. Unless you provide someone with the real credentials - there is nothing more to say.
Hey, perhaps you can change the credentials for a "public" test (you pick someone from the list, change the credentials for this person and this person can try it, after that - just change the credentials back).
cheers, robin _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
The problem here is not the credentials, Robin. I don't know why you have a different response from me, even using the fake credentials.
The following two rows :
from suds.client import Client Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl',
username="us", password="pwd")
don't giveme a 401 error but this result instead:
Traceback (most recent call last): File "o", line 2, in <module> Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl',
username="us", password="pwd") File "build/bdist.linux-x86_64/egg/suds/client.py", line 112, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 152, in open File "build/bdist.linux-x86_64/egg/suds/wsdl.py", line 136, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 79, in open File "build/bdist.linux-x86_64/egg/suds/reader.py", line 95, in download File "build/bdist.linux-x86_64/egg/suds/transport/https.py", line 60, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 62, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 118, in u2open File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response)
LOOP 107 TIMES ------------------------ File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 391, in open response = self._open(req, data) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in
<lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
Well, i can not reproduce the error (and now i also test it with suds 0.4.2). I suggest you read about how to do logging in suds:
https://fedorahosted.org/suds/wiki/Documentation#LOGGING
and provide us with more information.
with logging in DEBUG level there are only two added rows at the top of traceback :
DEBUG:suds.wsdl:reading wsdl at: https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl ... DEBUG:suds.transport.http:opening (https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl) Traceback (most recent call last): File "o", line 2, in <module> Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl%27,userna...",
password="pwd") .... <I avoid to put here the rest of the traceback because it is exactly like before>
import logging logging.basicConfig(level=logging.DEBUG) logging.getLogger('suds.client').setLevel(logging.DEBUG) (I also tried suds.transport and suds.wsdl with the same result) from suds.client import Client Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl',
username="us", password="pwd")
Ok, you can fetch the wsdl - but it looks like there is some recursive stuff in the wsdl (or xsd). So, without the wsdl (and/or the xsd) no one can help you.
cheers, robin _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
Ok, good to hear that you resolved your problem. But how could it be a auth problem ... i also tried to connect to your service with the wrong credentials ... and i got no recursion limit exeeded exception?
cheers, robin
On Wed, Dec 21, 2011 at 10:32 AM, Robin Wittler real@the-real.org wrote:
Ok, good to hear that you resolved your problem. But how could it be a auth problem ... i also tried to connect to your service with the wrong credentials ... and i got no recursion limit exeeded exception?
There is an open bug related to recursive imports in the WSDL causing unexpected recursion while parsing, eventually hitting the Python interpreter's recursive call limit: https://fedorahosted.org/suds/ticket/239. Several patches have been posted.
I'm not sure how the authentication issue might play into this. Perhaps the failed HTTP requests to pull down imported WSDLs triggered the recursion bug.
- Chris
On 21/12/11 11:45, jose soares wrote:
Robin Wittler wrote:
On 21/12/11 10:54, jose soares wrote:
Robin Wittler wrote:
On 21/12/11 08:29, jo wrote:
Jurko Gospodnetić wrote:
Hi.
> I'm trying to access to: > url="https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl" > > > to have the wsdl but it requires an authentication. > > cl = Client(url) > suds.transport.TransportError: HTTP Error 401: Authorization > Required > > I tried too: > cl = Client(url, username='us',password='pwd') > > wiyhout success. > > Could someone tell me how to access to this authenticated url to > download the wsdl like lynx do? > > lynx -source -auth=us:pwd > https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl > If you provide some sort of a username and password someone could possibly test this. Also, you did not provide the exact code you tried or say what exactly went wrong when you 'tried without success'. I tried just now and running:
> url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" > suds.client.Client(url) > raises an expected exception:
> suds.transport.TransportError: HTTP Error 401: Authorization > Required > while running:
> url = "https://webservices.IZSLER.it/wsAnagrafeIZSLERphp?wsdl" > suds.client.Client(url, username="us", password="pwd") > raises an expected exception:
> suds.transport.TransportError: HTTP Error 401: basic auth failed >
the correct url is: url = 'https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl' suds.client.Client(url=url, username="us", password="pwd")
and for me it returns a RuntimeError: maximum recursion depth exceeded error when using username and password. Even with real username and password (I'm sorry but I can't reveal the real credentials because this is a production site). mi version is:
>> suds.__version__ >>
'0.4'
File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in
<lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
since presumably user name "us" and password "pwd" are not correct.
Try to connect to the same URL using urllib. If you can do that - then suds should be able to connect to it as well (since it uses urllib under the hood).
Hope this helps.
Best regards, Jurko Gospodnetić _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
Well, with your given url (and fake username and password) i am getting a "TransportError: HTTP Error 401: basic auth failed".
So i assume that the transport layer works correctly.
I have tested this with suds version 0.3.9 + 0.4 + 0.4.1. Unless you provide someone with the real credentials - there is nothing more to say.
Hey, perhaps you can change the credentials for a "public" test (you pick someone from the list, change the credentials for this person and this person can try it, after that - just change the credentials back).
cheers, robin _______________________________________________ suds mailing list suds@lists.fedoraproject.org https://admin.fedoraproject.org/mailman/listinfo/suds
The problem here is not the credentials, Robin. I don't know why you have a different response from me, even using the fake credentials.
The following two rows :
from suds.client import Client Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl',
username="us", password="pwd")
don't giveme a 401 error but this result instead:
Traceback (most recent call last): File "o", line 2, in <module> Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl',
username="us", password="pwd") File "build/bdist.linux-x86_64/egg/suds/client.py", line 112, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 152, in open File "build/bdist.linux-x86_64/egg/suds/wsdl.py", line 136, in __init__ File "build/bdist.linux-x86_64/egg/suds/reader.py", line 79, in open File "build/bdist.linux-x86_64/egg/suds/reader.py", line 95, in download File "build/bdist.linux-x86_64/egg/suds/transport/https.py", line 60, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 62, in open File "build/bdist.linux-x86_64/egg/suds/transport/http.py", line 118, in u2open File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 397, in open response = meth(req, response)
LOOP 107 TIMES ------------------------ File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 510, in http_response 'http', request, response, code, msg, hdrs) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 429, in error result = self._call_chain(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 855, in http_error_401 url, req, headers) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 833, in http_error_auth_reqed return self.retry_http_basic_auth(host, req, realm) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 843, in retry_http_basic_auth return self.parent.open(req, timeout=req.timeout) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 391, in open response = self._open(req, data) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 409, in _open '_open', req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 369, in _call_chain result = func(*args) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1169, in https_open return self.do_open(httplib.HTTPSConnection, req) File "/home/jose/.virtualenv/lib/python2.6/urllib2.py", line 1134, in do_open r = h.getresponse() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 986, in getresponse response.begin() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 420, in begin self.msg = HTTPMessage(self.fp, 0) File "/home/jose/.virtualenv/lib/python2.6/mimetools.py", line 25, in __init__ rfc822.Message.__init__(self, fp, seekable) File "/home/jose/.virtualenv/lib/python2.6/rfc822.py", line 108, in __init__ self.readheaders() File "/home/jose/.virtualenv/lib/python2.6/httplib.py", line 276, in readheaders line = self.fp.readline() File "/home/jose/.virtualenv/lib/python2.6/socket.py", line 397, in readline data = recv(1) File "/home/jose/.virtualenv/lib/python2.6/ssl.py", line 96, in <lambda> self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) RuntimeError: maximum recursion depth exceeded
Well, i can not reproduce the error (and now i also test it with suds 0.4.2). I suggest you read about how to do logging in suds:
https://fedorahosted.org/suds/wiki/Documentation#LOGGING
and provide us with more information.
with logging in DEBUG level there are only two added rows at the top of traceback :
DEBUG:suds.wsdl:reading wsdl at: https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl ... DEBUG:suds.transport.http:opening (https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl) Traceback (most recent call last): File "o", line 2, in <module> Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl%27,userna...", password="pwd") .... <I avoid to put here the rest of the traceback because it is exactly like before>
import logging logging.basicConfig(level=logging.DEBUG) logging.getLogger('suds.client').setLevel(logging.DEBUG) (I also tried suds.transport and suds.wsdl with the same result) from suds.client import Client Client(url='https://webservices.IZSLER.it/wsAnagrafeIZSLER/gestioneUO.php?wsdl', username="us", password="pwd")
I sugggest that you try suds 0.4.1 or 0.4.2 ... could be possible that upstream already fixed some things - just for the case that you are triggering some bug ... but it also possible that the wsdl is not correct.
cheers, robin