Example #1
0
def setupdf():
    """Setup Dragonfly ESB configuration.
    """
    setupsa()

    from idileslib.soa import ServiceProxy
    ServiceProxy.load_locations('/opt/idiles/dragonfly/webservices/testing.conf')
Example #2
0
    def __init__(self, model, *args, **kargs):
        super(controllers.Controller, self).__init__(*args, **kargs)
        self.model = model
        self.services = {}
        base = config.get('services.path')
        ServiceProxy.load_locations(config.get('esb.config.path'))

        esb_services = ServiceProxy.get_locations().keys()

        for d in os.listdir(base):
            if d.startswith('.'):
                continue
            spath = os.path.join(base, d)
            if os.path.isdir(spath):
                try:
                    # TODO: Needs support for directory names like
                    # 'service-0.1'.
                    service = self.import_service(base, d)
                    if not service.name in esb_services:
                        continue
                    if service.model:
                        self.model.__dict__.update(service.model.__dict__)
                    self.services[service.name] = service
                except Exception, e:
                    print "Could not import service %s: %s" % (spath, e.message)
Example #3
0
from idileslib.soa import ServiceProxy

if __name__ == '__main__':
    s = ServiceProxy('http://localhost:8080/services/sample')
    r = ''
    for i in range(120):
        r += s.hello()
    print len(r)