On 09/10/2009 11:00 AM, Chris Frantz wrote:
Hello,
I would like to use suds to talk to several SOAP services, each using
the same WSDL. The wsdl file is rather large (about 500K) and
translates to about 50M of memory once parsed.
If I do this:
c1 = Client('file:myservice.wsdl)
c1.set_options(location="https://addr1/soap")
c2 = Client('file:myservice.wsdl)
c2.set_options(location="https://addr2/soap")
(etc)
Then each Client instance adds about 50M to my program's memory
footprint. Is there any way to parse the WSDL once and create
several client objects based on the already-parsed file?
Not really.
A cursory inspection of the Client code suggests I might be able to
create the first Client() and then make new instances of client that
reference the wsdl, factory and sd members of the original, but
contains different Options and possibly it's own ServiceSelector.
This approach is your best bet. Let me tweak a few things to facilitate this.
Suggestions or comments?
--Chris
_______________________________________________
fedora-suds-list mailing list
fedora-suds-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/fedora-suds-list