44"""
55import logging
66import urllib
7- from . import bindings
87
9- from tornado import gen , httpclient
108from requests import Response , Session
119from requests .auth import HTTPBasicAuth , HTTPDigestAuth
10+ from tornado import gen , httpclient
1211
12+ from zeep .tornado import bindings
1313from zeep .transports import Transport
1414from zeep .utils import get_version
1515from zeep .wsdl .utils import etree_to_string
@@ -89,7 +89,7 @@ def fetch(self, address, method, headers, message=None):
8989 auth_password = self .session .password
9090 auth_mode = 'digest'
9191 else :
92- raise StandardError ('Not supported authentication.' )
92+ raise Exception ('Not supported authentication.' )
9393
9494 # extracting client cert
9595 client_cert = None
@@ -111,7 +111,8 @@ def fetch(self, address, method, headers, message=None):
111111 'auth_username' : auth_username ,
112112 'auth_password' : auth_password ,
113113 'auth_mode' : auth_mode ,
114- 'validate_cert' : self .session .verify ,
114+ 'validate_cert' : self .session .verify is not None ,
115+ 'ca_certs' : self .session .verify ,
115116 'client_key' : client_key ,
116117 'client_cert' : client_cert
117118 }
@@ -130,4 +131,4 @@ def new_response(self, response):
130131 new ._content = response .body
131132 new .status_code = response .code
132133 new .headers = dict (response .headers .get_all ())
133- return new
134+ return new
0 commit comments