python-zeep icon indicating copy to clipboard operation
python-zeep copied to clipboard

Using specific port returns 403 from server

Open skilletti opened this issue 3 years ago • 1 comments

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 avatar Apr 25 '22 20:04 skilletti

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

skilletti avatar Apr 25 '22 20:04 skilletti