a simple tool to manage dubbo service by telnet
- ls -l interface
- invoke com.xx.yy.interface.method(xx,yy)
- ls -l interface
du = Dubbo(ip, port)
service = du.list_service('com.test.shared.service.MyService')
- invoke com.xx.yy.interface.method(xx,yy)
if arguments is primitive types
du = Dubbo(ip, port)
interface = 'com.test.shared.service.MyService'
method = 'getById'
id = '00001'
name = 'my_name'
json_data = du.invoke_service(interface,method, id=id, name=name)
if method no arguments, call like this:
json_data = du.invoke_service(interface,method)
if arguments include model, you must add the class of the model to the param
person = {}
person["id"] = "user01"
person["name"] = 'test'
person["class"] = "com.test.shared.model.Person"
interface = 'com.test.shared.service.MyService'
method = "addTradeInfo"
resp = du.invoke_service(interface, method, person = person)