use of org.apache.dubbo.common.bytecode.NoSuchMethodException in project dubbo by alibaba.
the class RpcMessageHandler method reply.
public Object reply(ExchangeChannel channel, RpcMessage msg) throws RemotingException {
String desc = msg.getMethodDesc();
Object[] args = msg.getArguments();
Object impl = mProvider.getImplementation(msg.getClassName());
Wrapper wrap = Wrapper.getWrapper(impl.getClass());
try {
return new MockResult(wrap.invokeMethod(impl, desc, msg.getParameterTypes(), args));
} catch (NoSuchMethodException e) {
throw new RemotingException(channel, "Service method not found.");
} catch (InvocationTargetException e) {
return new MockResult(e.getTargetException());
}
}
Aggregations