Hello List, some time ago already, Viktor Ferenczi wrote a jsonrpc server in Python (see http://python.cx.hu/qxjsonrpc). Unfortunately, he currently has no time to further develop it. I imported his externally hosted code to qooxdoo-contrib, fixed a small typo which kept it from functioning, and rewrote the applciation wrapper for his python package:
http://qooxdoo.org/documentation/RPC_Python It is working now with the RpcExample and RpcConsole clients, and thus should work with any code that works with qx.io.remote.Rpc. I have departed from Viktors approach as far as RpcPython has been brought closer to the RpcPhp implementation. In Viktor's original code, the server script manually mapped each service to a particular Python class. In contrast, the current code receives a service name in dot-separated path format and expect to find the class containing the service in a file. If the service name is “foo.bar.baz”, the class is named “Baz” in the “foo.bar.baz” module, located in “foo/bar/baz.py” somewhere on the python class path. The class file is dynamically loaded and the service object instantiated when the request is received (will be done only once for each service object). The classes and methods are protected. The service class is loaded only if the containing module contains the “isRpcService” property set to True and if the method contains the “public” decorator. I am fairly new to Python, that's why I welcome comments and criticism about the current implementation, in particular, on security issues etc. Also, please go ahead and test the code yourself. Thanks to Viktor for his code! Todo: - update qxjsonrpc to a newer cjson version (currently works only with cjson 0.3). Thanks, Christian -- View this message in context: http://n2.nabble.com/RpcPython-fixed-and-refactored-tp4053312p4053312.html Sent from the qooxdoo mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
