Meituan-Dianping / octo-rpc

OCTO-RPC 是支持Java和C++的企业级通信框架,在RPC服务之上扩展了丰富的服务治理功能,为美团各业务线提供高效、统一的通信服务。
Apache License 2.0
648 stars 186 forks source link

origin thrift Java client can't invoke a octo service #6

Closed icebergger closed 5 years ago

icebergger commented 5 years ago

Hi,

I have a origin thrift java client, but can't invoke the octo service as well. the client code is blocked in line " echo = client.echo("11111");"

client code:

`public class OriginThriftClient {

 public static void main(String[] args) {

    TTransport transport = null;
    try {
        transport = new TFramedTransport(new TSocket("localhost", 9001));
        transport.open();

        TProtocol protocol = new TBinaryProtocol(transport);
        Echo.Iface client = new Echo.Client(protocol);
        String echo = client.echo("abc");
        System.out.println(echo);

         echo = client.echo("11111");
        System.out.println(echo);

    } catch (Exception e) {
        e.printStackTrace();
    } finally {
        transport.close();
        ServiceBootstrap.clearGlobalResource();
    }
}

}`

server code: com.meituan.dorado.testserver.ServerMain in module dorado-test-server

YangruiEmma commented 5 years ago

Thanks very much, I have fixed it. And add a test case, you can run OriginThriftTest in dorado-test-integrationmodule