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(a)lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/suds
--
Jose Soares
Sferacarta Net
Via Bazzanese 69
40033 Casalecchio di Reno
Bologna - Italy
Ph +39051591054
fax +390516131537
web:www.sferacarta.com
Le informazioni contenute nella presente mail ed in ogni eventuale file allegato sono
riservate e, comunque, destinate esclusivamente alla persona o ente sopraindicati, ai
sensi del decreto legislativo 30 giugno 2003, n. 196. La diffusione, distribuzione e/o
copiatura della mail trasmessa, da parte di qualsiasi soggetto diverso dal destinatario,
sono vietate. La correttezza, l’integrità e la sicurezza della presente mail non possono
essere garantite. Se avete ricevuto questa mail per errore, Vi preghiamo di contattarci
immediatamente e di eliminarla. Grazie.
This communication is intended only for use by the addressee, pursuant to legislative
decree 30 June 2003, n. 196. It may contain confidential or privileged information. You
should not copy or use it to disclose its contents to any other person. Transmission
cannot be guaranteed to be error-free, complete and secure. If you are not the intended
recipient and receive this communication unintentionally, please inform us immediately and
then delete this message from your system. Thank you.