mvantellingen / python-zeep

A Python SOAP client
http://docs.python-zeep.org
Other
1.87k stars 578 forks source link

407 Client Error: Proxy Authentication Required for url #763

Open fncalderong opened 6 years ago

fncalderong commented 6 years ago

Hi, I am trying to create a client, but it gives the following error:

requests.exceptions.HTTPError: 407 Client Error: Proxy Authentication Required for url: http://schemas.xmlsoap.org/soap/encoding/

I am actually give it proxy authentication by using

proxies = { "http": 'http://**host**:8080', "https": 'http://**host**:8080' }

session = Session() session.proxies = proxies session.auth = HTTPBasicAuth('user', 'pass*') transport = Transport(session=session) print(transport) client = Client(wsdl='Soap/InformacionComercial_Wsdl.xml', transport=transport)...

But if I use

import requests proxies = {"http": 'http://host:8080', "https": 'http://host:8080'} auth = requests.auth.HTTPProxyAuth('user', 'pass*') r = requests.get('http://schemas.xmlsoap.org/soap/encoding/', proxies=proxies, auth=auth) print(r.status_code, r.reason)

ir returns 200 OK. Thanks for your help.

regolith commented 6 years ago

Your working example uses HTTPProxyAuth, but your non-working example code uses HTTPBasicAuth. Is that what's causing the issue?

asaliheddine commented 4 years ago

Hi, i have the same issue, can u pls share how did you fix it?