skip to navigation
skip to content

dubbo_telnet 1.0.1b3

Dubbo Telnet Client of python

Package Documentation

通过telnet调用Dubbo接口

### Example

```python
import dubbo_telnet

Host = '192.168.1.203' # Doubble服务器IP
Port = 28008 # Doubble服务端口

# 初始化dubbo对象
conn = dubbo_telnet.connect(Host, Port)

# 设置telnet连接超时时间
conn.set_connect_timeout(10)

# 设置dubbo服务返回响应的编码
conn.set_encoding('gbk')

interface = 'com.zrj.pay.trade.api.QueryTradeService'
method = 'tradeDetailQuery'
param = '{"message": "HelloWorld"}'
print conn.invoke(interface, method, param)

command = 'invoke com.zrj.pay.trade.api.QueryTradeService.tradeDetailQuery({"message":"HelloWorld"})'
print conn.do(command)
```  
File Type Py Version Uploaded on Size
dubbo_telnet-1.0.1b3.tar.gz (md5) Source 2016-06-17 3KB