Commit 0a65073a authored by Craig Weber's avatar Craig Weber

Merge branch 'custom_plugins' into 'master'

Add ability to get a client with a defined list of plugins

See merge request !1
parents 20bd0ecb 18974d92
Pipeline #15607029 passed with stage
in 3 minutes and 13 seconds
......@@ -46,13 +46,15 @@ def get_transport():
return HttpTransport()
def get_client(wsdl, log_prefix, **kwargs):
def get_client(wsdl, log_prefix, plugins=[], **kwargs):
Get a SOAP Client object for the given WSDL. Client objects are cached in :attr:`soap.clients <soap.clients>`
and keyed by the WSDL URL.
:param wsdl: String URL of a SOAP WSDL
:param log_prefix: String prefix to prepend to log lines (when logging XML traffic in DEBUG mode)
:param plugins: List of additional plugins :class:`suds.plugin.Plugin <suds.plugin.Plugin>` to pass on to the
:class:`suds.client.Client <suds.client.Client>` object.
:param kwargs: Optional keyword arguments to pass on to the :class:`suds.client.Client <suds.client.Client>` object
:return: :class:`suds.client.Client <suds.client.Client>` object
:rtype: suds.client.Client
......@@ -61,7 +63,6 @@ def get_client(wsdl, log_prefix, **kwargs):
wsdl = settings.WSDL_INTERCEPTS[wsdl]
if wsdl not in clients:
plugins = []
if settings.DEBUG:
plugins.append( LogPlugin(log_prefix) )
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment