suds: how to set proxy?

Johann Spies johann.spies at gmail.com
Mon Nov 8 02:47:31 EST 2010


According to the suds documentation I can set the proxy setting like this:

d = dict(http='host:80', https='host:443', ...)
client.set_options(proxy=d)

My problem is that you can only do that after 'client' was initiated like this:

client = Client(url)

And I need the proxy to reach the url.

I have tried the following ending in a SYN_SENT each time - ignoring
the proxy settings:

proxy = dict(http='proxy.sun.ac.za:3128', https='proxy.sun.ac.za:3128')

url = 'url_of_wdsl'
t = HttpAuthenticated()
client = Client(url, proxy = proxy, transport = t,
username='myusername', password='pw')

or

url = 'url_of_wdsl'
t = HttpAuthenticated()
client = Client(url, transport = t, username='myusername', password='pw')
client.set_options(proxy=proxy)

So how do I get suds to respect the proxy setting?

Regards
Johann
-- 
 May grace and peace be yours in abundance through the full knowledge
of God and of Jesus our Lord!  His divine power has given us
everything we need for life and godliness through the full knowledge
of the one who called us by his own glory and excellence.
                                                    2 Pet. 1:2b,3a



More information about the Python-list mailing list