try {
Object[] args = ObjectDescriptor.getArgs(wireContext, argDescriptors);
Class<?> clazz = target.getClass();
Method method = ReflectUtil.findMethod(clazz, methodName, argDescriptors, args);
if (method==null) {
throw new WireException("method "+ReflectUtil.getSignature(methodName, argDescriptors, args)+" unavailable");
}
ReflectUtil.invoke(method, target, args);
} catch (WireException e) {
throw e;
} catch (Exception e) {
throw new WireException("couldn't invoke method "+methodName+": "+e.getMessage(), e);
}
}