def generate_static_clients(): lwcode = gen.gen(client.Client(support('lyrics.wsdl', 'r'))) with open(os.path.join(HERE, 'lwclient.py'), 'w') as fh: fh.write(lwcode) zfcode = gen.gen(client.Client(support('zfapi.wsdl', 'r'))) with open(os.path.join(HERE, 'zfclient.py'), 'w') as fh: fh.write(zfcode) bzcode = gen.gen(client.Client(support('boyzoid.wsdl', 'r'))) with open(os.path.join(HERE, 'bzclient.py'), 'w') as fh: fh.write(bzcode) import lwclient import zfclient import bzclient return lwclient, zfclient, bzclient
def clientClass(self, wsdl): cl = scio.Client(wsdl) code = gen.gen(cl) ns = {} exec code in ns cls = type('StaticStub', (StubClient, ns['Client']), {}) return cls()
def check(wsdl): code = gen.gen(client.Client(helpers.support(wsdl))) ns = {} print code exec code in ns