title: Connection refused when using zeep SSL
body: <p>I am trying to access a SOAP server using <a href="http://docs.python-zeep.org" rel="nofollow noreferrer">zeep</a>. My server uses SSL with a custom certificate, and connection to that server works, with my cert, or ignoring it:</p>
  
  <pre><code>python -mzeep "https://&lt;server-ip&gt;/servicemanager/1?wsdl" --no-verify
  </code></pre>
  
  <p>I get a long list of Prefixes, Global elements, Global types, Bindings and Service. The latter one says:</p>
  
  <pre><code>Service: ServiceManager
       Port: servicemanager_1 (Soap11Binding: {http://soap.client.&lt;snipped&gt;.at}servicemanager_1Binding)
           Operations:
              getServices() -&gt; return: ns0:service[]
  </code></pre>
  
  <p>So, from what I can say by now, I can create a <code>client</code> object and call it's service named <code>getServices()</code>.</p>
  
  <pre><code>from zeep import CachingClient as Client
  from zeep.wsse.signature import Signature
  from zeep.transports import Transport
  from requests import Session, Request
  
  session = Session()
  session.verify = False
  transport = Transport(session=session)
  
  c = Client('https://&lt;server-ip&gt;/servicemanager/1?wsdl', transport=transport)
  c.service.getServices()
  </code></pre>
  
  <p>But that leads to an error in urllib3 (<em>~/.virtualenvs/soap/lib/python3.5/site-packages/urllib3/util/connection.py</em>):</p>
  
  <pre><code>ConnectionRefusedError: [Errno 111] Connection refused
  
  During handling of the above exception, another exception occurred:
  [...]
  requests.exceptions.ConnectionError: HTTPSConnectionPool(host='localhost',
  port=443): Max retries exceeded with url: /servicemanager/1 (Caused by
  NewConnectionError('&lt;urllib3.connection.VerifiedHTTPSConnection object
  at 0x7f4e2a6f7d30&gt;: Failed to establish a new connection: [Errno 111]
  Connection refused',))
  </code></pre>
  
  <p>It does not matter if I ignore the SSL verification, or provide a CA_BUNDLE. both are accepted, the client is created, but I can't call the <code>getServices()</code> method.</p>
  
  <p>What did I forget here? I don't think this is a zeep problem, as the underlying urllib3 throws the exception. But I tried for hours and searched the internet for a solution, without success.</p>
  
  <p>Apart of the XML I get from the endpoint is:</p>
  
  <pre><code>&lt;service name="ServiceManager"&gt;
    &lt;port name="servicemanager_1" binding="tns:servicemanager_1Binding"&gt;
      &lt;soap:address location="http://localhost/servicemanager/1"/&gt;
    &lt;/port&gt;
  &lt;/service&gt;
  </code></pre>
  
  <p>And I don't know why it returns a "localhost" there - is zeep using that for its call? Then I would understand why permanent errors occur.</p>
  
  <p>Any hints?</p>