mvantellingen / python-zeep

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

Using specific port returns 403 from server #1308

Closed skilletti closed 1 year ago

skilletti commented 2 years ago

Hello everyone,

I have an issue with accessing the WSDL interface on port 8080 with our corporate proxy. It seems like Zeep still tries access it on 80 port, which is not allowed for connections, thats why I receive a 403 Forbidden error.

Is there any way to force the port 8080?

My Zeep version is 4.1.0

My code:

proxies = { 'http': 'proxy:port'}

session = Session()
session.proxies = proxies
session.verify = False
settings = Settings(force_https=False)
transport = Transport(session=session)

client = Client('http://soap.host.com:8080/folder/script.php?WSDL', transport=transport, settings=settings)

client.service.openService(args)
Content: b'<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html><head>\n<title>403 Forbidden</title>\n</head><body>\n<h1>Forbidden</h1>\n<p>You don\'t have permission to access /folder/script.php\non this server.</p>\n</body></html>\n'

The same happens if I try to make a curl request without specifying the 8080 port.

Thank you!

skilletti commented 2 years ago

Same issue when testing the WSDL with python -m zeep <url-to-wsdl>