try {
String operation = getOperation(methodName);
MethodInfo methodInfo = interfaceInfo.getMethod(methodName);
if (methodInfo == null) {
throw new ServiceRuntimeException("Invalid Method " + methodName);
}
Class[] parameterTypes = null;
Class returnType = null;
if (methodInfo.getMethod() != null) {
parameterTypes = methodInfo.getMethod().getParameterTypes();
returnType = methodInfo.getMethod().getReturnType();
} else {
String[] types = methodInfo.getParameterTypes();
if (args != null) {
if (types.length != args.length)
throw new ServiceRuntimeException(
"The argument list doesn't match the method signature of " + methodName);
}
parameterTypes = new Class[types.length];
for (int i = 0; i < types.length; i++) {