Jeff,
Here is a patch that allows new Client instances to be based off an
existing Client. This appears to work fine, but it hasn't been
extensively tested.
Best Regards,
--Chris
--- client.py 2009-09-14 10:35:35.000000000 -0500
+++ ../../python-suds-0.3.7/suds/client.py 2009-09-10 11:47:22.000000000 -0500
@@ -98,18 +98,27 @@
@param kwargs: keyword arguments.
@see: L{Options}
"""
+ base = None
+ if 'base' in kwargs:
+ base = kwargs['base']
+ del kwargs['base']
options = Options()
options.cache = FileCache(days=1)
options.transport = HttpAuthenticated()
options.set(**kwargs)
self.options = options
- self.wsdl = Definitions(url, options)
- self.factory = Factory(self.wsdl)
+ if base:
+ self.wsdl = base.wsdl
+ self.factory = base.factory
+ self.sd = base.sd
+ else:
+ self.wsdl = Definitions(url, options)
+ self.factory = Factory(self.wsdl)
+ self.sd = []
+ for s in self.wsdl.services:
+ sd = ServiceDefinition(self.wsdl, s)
+ self.sd.append(sd)
self.service = ServiceSelector(self, self.wsdl.services)
- self.sd = []
- for s in self.wsdl.services:
- sd = ServiceDefinition(self.wsdl, s)
- self.sd.append(sd)
self.messages = dict(tx=None, rx=None)
def set_options(self, **kwargs):