Hello, @mvantellingen!
Congrats for this great Python SOAP client.
I've found an error related to the enhancement done for issue #228.
Failed to establish a new connection: [Errno -2] Name or service not known.
Take a look in zeep.wsdl.bindings.soap.py file, method process_service_port (lines 156-167).
def process_service_port(self, xmlelement, force_https=False):
address_node = xmlelement.find('soap:address', namespaces=self.nsmap)
# Force the usage of HTTPS when the force_https boolean is true
location = address_node.get('location')
if force_https and location and location.startswith('http://'):
logger.warning("Forcing soap:address location to HTTPS")
location = 'https://' + location[8:]
return {
'address': location
}
location[8:] should be location[7:], cause it is a slice over 'http://' string. For example, if we have an address like http://myserver.com/ the result will be https://yserver.com/.
I'm using Zeep 0.22.1.
Whoops, nice catch. I should have written a test case for this :(
I'll fix it asap, or if you want to submit a PR including test then that is also really appreciated 馃憤
@mvantellingen, PR submitted.
@mvantellingen, will you create a new version with this fix? 0.22.2?
Yes, although i'd like to bundle multiple fixes per release to minimize my work. So it might take a couple of days
Most helpful comment
@mvantellingen, PR submitted.