Help with suds: HTTP Error 401
Sean DiZazzo
half.italian at gmail.com
Sat Jun 19 12:16:25 EDT 2010
On Jun 11, 5:27 am, Eric von Horst <z80vsvi... at hotmail.com> wrote:
> I have small program that tries to open a wsdl. When I execute the
> program I am getting 'suds.transport.TransportError: HTTP Error 401:
> Unauthorized'
Hey Eric,
Im a suds noob as well. I found some code that led me to the below
example. It worked for me when connecting to one particular site. I
couldnt tell you why though... I guess its worth a shot.
from suds.transport.https import HttpAuthenticated
import urllib2
t = HttpAuthenticated(username='me', password='password')
t.handler = urllib2.HTTPBasicAuthHandler(t.pm)
t.urlopener = urllib2.build_opener(t.handler)
c = client.Client(url='http://xxx.xxx.xxx.xxx/path/to?
WSDL',transport=t)
~Sean
More information about the Python-list
mailing list