fixed
servcice Proxy
This commit is contained in:
parent
05fd997c81
commit
6d6f93cdee
|
@ -67,6 +67,12 @@ public class ServiceProxy {
|
||||||
String result = null;
|
String result = null;
|
||||||
try {
|
try {
|
||||||
result =this.serviceInvoker.invokeForByteString(request.getTarget(), request.getMethod(), request.getParamsList().asByteStringList());
|
result =this.serviceInvoker.invokeForByteString(request.getTarget(), request.getMethod(), request.getParamsList().asByteStringList());
|
||||||
|
|
||||||
|
ServerOutput reply = ServerOutput.newBuilder()
|
||||||
|
.setResult(result)
|
||||||
|
.build();
|
||||||
|
responseObserver.onNext(reply);
|
||||||
|
responseObserver.onCompleted();
|
||||||
} catch (NoSuchMethodException e) {
|
} catch (NoSuchMethodException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
responseObserver.onError(e);
|
responseObserver.onError(e);
|
||||||
|
@ -83,11 +89,7 @@ public class ServiceProxy {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
responseObserver.onError(e);
|
responseObserver.onError(e);
|
||||||
}
|
}
|
||||||
ServerOutput reply = ServerOutput.newBuilder()
|
|
||||||
.setResult(result)
|
|
||||||
.build();
|
|
||||||
responseObserver.onNext(reply);
|
|
||||||
responseObserver.onCompleted();
|
|
||||||
|
|
||||||
// String targetServiceName = request.getTarget();
|
// String targetServiceName = request.getTarget();
|
||||||
// Object service = ctx.getBean(targetServiceName);
|
// Object service = ctx.getBean(targetServiceName);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user