Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8441529
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:35:03+00:00 2026-06-10T08:35:03+00:00

Background I’m building a SOAP client with python 2.7.3 and using the suds 0.4.1

  • 0

Background

I’m building a SOAP client with python 2.7.3 and using the suds 0.4.1 library provided by Canonical. The server is using basic authentication over HTTPS.

Problem

Can’t pass authentication on the server, even to get at the WSDL. I get the following error:

suds.transport.TransportError: HTTP Error 401: Unauthorized

Attempts at resolution and code

I have tried both of the authentication methods described in the suds documentation, but still get the error above at the client = Client(url, ...) line. I’ve confirmed the credentials and ability to connect in a web browser, which works fine.

After declaring wsdl_url, username and password, I tried:

client = Client(url=wsdl_url, username=username, password=password)

# as well as:

t = HttpAuthenticated(username=username, password=password)
client = Client(url=wsdl_url, transport=t)

# and even:

t = HttpAuthenticated(username=username, password=password)
t.handler = urllib2.HTTPBasicAuthHandler(t.pm)
t.urlopener = urllib2.build_opener(t.handler)
client = Client(url=wsdl_url, transport=t)

That last one seems to, at least, get a response from the WSDL URL in another question about HTTP authentication with suds.

Other notes

This question is distinct from this similar question because I am using:

from suds.transport.https import HttpAuthenticated
# not:
# from suds.transport.http import HttpAuthenticated

and from the Traceback, the client = Client(url, ...) call clearly hits suds.transport.https.py:

File "/usr/lib/python2.7/dist-packages/suds/client.py", line 112, in __init__ self.wsdl = reader.open(url)
File "/usr/lib/python2.7/dist-packages/suds/reader.py", line 152, in open d = self.fn(url, self.options)
File "/usr/lib/python2.7/dist-packages/suds/wsdl.py", line 136, in __init__ d = reader.open(url)
File "/usr/lib/python2.7/dist-packages/suds/reader.py", line 79, in open d = self.download(url)
File "/usr/lib/python2.7/dist-packages/suds/reader.py", line 95, in download fp = self.options.transport.open(Request(url))
File "/usr/lib/python2.7/dist-packages/suds/transport/https.py", line 60, in open return  HttpTransport.open(self, request)
File "/usr/lib/python2.7/dist-packages/suds/transport/http.py", line 64, in open raise TransportError(str(e), e.code, e.fp)

What am I missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:35:04+00:00Added an answer on June 10, 2026 at 8:35 am

    suds wasn’t adding the authorization header to the request, so I set it manually:

    import base64
    
    # code excluded for brevity
    
    base64string = base64.encodestring('%s:%s' % (username, password)).replace('\n', '')
    authenticationHeader = {
        "SOAPAction" : "ActionName",
        "Authorization" : "Basic %s" % base64string
    }
    client = Client(url=wsdl_url, headers=authenticationHeader)
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Background: I'm using the (fantastic) Vim plugin python-mode , which includes the pep8 linter.
Background: We're building an application that allows our customers to supply data in a
Background - I am using paramiko to put files on a bunch of remote
Background: Using unix, codeigniter from localhost. I'd like to run a controllers via a
Background We currently use OpenID for authentication of users, and use the Claimed Identity
Background: I'm running a Minecraft server for friends on a VPS, and I'm attempting
Background I have an installation of VisualSVN on a server. under this, I have
Background: I have several builds running on a Windows Server 2003 R2 machine via
Background info: Me and a couple of friends are building this platform game in
Background Windows 7 x 64 Python 2.7 Django 1.4 Celery with Redis bundle While

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.