[Tutor] Send SOAP to Proxy

Joao Carlos Silva de Oliveira Matos joao.oliveira at ufob.edu.br
Mon Nov 29 16:59:32 EST 2021


I've been trying to access a WSDL Service via a SOAP protocol. But first I
need to get to a proxy in my University because the server will only accept
it as a client.

I found Zeep as the main python library for this job. But I have not been
successful in my tries. I know that I should use "HTTP". Another important
note: IT from the University says my request are getting there as Web
Application, meanwhile other requests are labeled as SOAP.

I hope you could help me find a better way to write this script without
getting error 403.

These are some structures I've already tried:

#01
session = Session()

session.proxies = {
    'http': 'http://proxy-ip-adress:8080'
}

transport=Transport(session=session)
client = Client('http://webservice/path?wsdl', transport=transport)

result = client.service.getMethod('params')

print(result)
---------------------------------------------------------------------------------------------------------

#02
client = Client('http://proxy-ip-adress:8080/path?wsdl')

result = client.service.getMethod('params')

print(result)

I've also tried the transport docs from Transports — Zeep 4.1.0
documentation (python-zeep.org)
<https://docs.python-zeep.org/en/master/transport.html> and I've tried
setting session.trust_env = False.
-- 
[image: Ficheiro:Brasão da UFOB.png – Wikipédia, a enciclopédia livre]
João Carlos Silva de Oliveira Matos
Bolsista de Inovação e Tecnologia
PROFNIT - Centro das Humanidades - UFOB
Mat. 2020100150


More information about the Tutor mailing list