diff --git a/src/main/java/com/loafle/overflow/proxy/ServiceProxy.java b/src/main/java/com/loafle/overflow/proxy/ServiceProxy.java index c097edc..a805e84 100644 --- a/src/main/java/com/loafle/overflow/proxy/ServiceProxy.java +++ b/src/main/java/com/loafle/overflow/proxy/ServiceProxy.java @@ -67,6 +67,12 @@ public class ServiceProxy { String result = null; try { 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) { e.printStackTrace(); responseObserver.onError(e); @@ -83,11 +89,7 @@ public class ServiceProxy { e.printStackTrace(); responseObserver.onError(e); } - ServerOutput reply = ServerOutput.newBuilder() - .setResult(result) - .build(); - responseObserver.onNext(reply); - responseObserver.onCompleted(); + // String targetServiceName = request.getTarget(); // Object service = ctx.getBean(targetServiceName);