|
From: <cl...@br...> - 2014-05-09 17:40:48
|
Dear colleagues,
Testing a Java RPC-JSON package under Jython 2.7 beta 1. One of the
classes with an empty argument input list, throws and error:
invoker = JsonRpcInvoker()
TypeError: 'NoneType' object is not callable
The Java equivalent is: JsonRpcInvoker invoker = new JsonRpcInvoker();
The import of the class seems to work OK.
Code:
--------
..
sys.path.append(userdir + "/jsonrpc-1.0/jsonrpc-1.0-client.jar")
from org.json.rpc.client import *
..
url = "http://localhost:8080/jsonrpc"
transport = HttpJsonRpcClientTransport(URL(url))
invoker = JsonRpcInvoker() # <======= this line is
causing the error:
calc = invoker.get(transport, "calc", Calculator.class)
result = calc.add(1, 2)
print "Result = " + str(3)
Any idea what's wrong with the instantiation of this Java class, or how to
fix it, or is it related to the dynamic class loader?
I've also tried with .newInstance() which also throws the same error.
Regards,
Claude
Claude Falbriard
Certified IT Specialist L2 - Middleware
AMS Hortolândia / SP - Brazil
phone: +55 13 9 9760 0453
cell: +55 13 9 8117 3316
e-mail: cl...@br...
|