feiyuw / dubbo-py

Dubbo(Hessian2) protocol codec and provider/consumer library
BSD 2-Clause "Simplified" License
15 stars 4 forks source link

List或者Long型 这种类型的参数如何传递呢 #4

Closed caishiwei closed 4 years ago

feiyuw commented 5 years ago
from dubbo.java_class import JavaList, JavaLong
from dubbo.client import DubboClient

client = DubboClient('127.0.0.1', 12358)
resp = client.send_request_and_return_response(service_name='calc', method_name='expx', args=[JavaList([1, 2, 3]), JavaLong(123))

不知道这样是不是能够解决你的问题,其实JavaList这种只是做了个简单封装,类似如JavaList = type('java.util.List', (list, ), {})