Constructing a Zeep Client from a remote WSDL can immediately fetch that document and its imports. Configure the transport first, rather than setting a proxy after Client has already tried to load the service description.

from requests import Session
from zeep import Client
from zeep.transports import Transport

session = Session()
session.proxies.update({
    "http": "http://proxy.example.net:8080",
    "https": "http://proxy.example.net:8080",
})

transport = Transport(
    session=session,
    timeout=10,
    operation_timeout=30,
)
client = Client(wsdl_url, transport=transport)

wsdl_url is the actual service-description URL. If that service and its imports are publicly reachable and public proxies are permitted, the HTTP proxy list supplies candidates for the session’s proxy URLs. Keep the configured session alive for subsequent SOAP operations, then close it when that workload ends.

Transport.timeout controls WSDL and XSD loading. operation_timeout controls HTTP requests made for service operations. A metadata timeout during Client construction is therefore a different stage from a method call timing out later.

Requests’ environment integration remains active in this example. If environment proxy values conflict with an explicitly required route, use session.trust_env=False and supply any needed CA bundle and authentication settings explicitly.

Check the imported document’s URL when initialization still fails. A top-level WSDL can load successfully while an imported schema uses another hostname or destination protocol.

Artiglyn mynjee