From d3a656997111c526f3371ac9a11bd7940ac5b91a Mon Sep 17 00:00:00 2001 From: caio2k Date: Mon, 20 Jan 2014 19:03:35 +0100 Subject: [PATCH 1/2] added support for http auth in Create Soap Client --- src/SudsLibrary/clientmanagement.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/SudsLibrary/clientmanagement.py b/src/SudsLibrary/clientmanagement.py index 16cb628..38d1867 100644 --- a/src/SudsLibrary/clientmanagement.py +++ b/src/SudsLibrary/clientmanagement.py @@ -23,7 +23,7 @@ class _ClientManagementKeywords(object): - def create_soap_client(self, url_or_path, alias=None, autoblend=False, timeout='90 seconds'): + def create_soap_client(self, url_or_path, alias=None, autoblend=False, timeout='90 seconds', username=None, password=None): """Loads a WSDL from the given URL/path and creates a Suds SOAP client. Returns the index of this client instance which can be used later to @@ -46,6 +46,10 @@ def create_soap_client(self, url_or_path, alias=None, autoblend=False, timeout=' url = self._get_url(url_or_path) autoblend = to_bool(autoblend) kwargs = {'autoblend': autoblend} + if username: + kwargs['username']=username + if password: + kwargs['password']=password imports = self._imports if imports: self._log_imports() From 409d099f0311fb0d7b3b04e6bc9fdea051b2639a Mon Sep 17 00:00:00 2001 From: caio2k Date: Wed, 29 Jan 2014 19:02:28 +0100 Subject: [PATCH 2/2] better check for username --- src/SudsLibrary/clientmanagement.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SudsLibrary/clientmanagement.py b/src/SudsLibrary/clientmanagement.py index 38d1867..1e464fb 100644 --- a/src/SudsLibrary/clientmanagement.py +++ b/src/SudsLibrary/clientmanagement.py @@ -46,7 +46,7 @@ def create_soap_client(self, url_or_path, alias=None, autoblend=False, timeout=' url = self._get_url(url_or_path) autoblend = to_bool(autoblend) kwargs = {'autoblend': autoblend} - if username: + if username!=None: kwargs['username']=username if password: kwargs['password']=password