public Object invokeMethod() throws RestServiceException, InvocationTargetException, IllegalAccessException, ParseException { validate(); Object service = AppBeans.get(serviceName); Method serviceMethod = findMethod(service); this.methodReturnType = serviceMethod.getReturnType(); List<Object> paramValues = new ArrayList<>(); Class<?>[] types = serviceMethod.getParameterTypes(); for (int i = 0; i < types.length; i++) { Class<?> aClass = types[i]; paramValues.add(ParseUtils.toObject(aClass, paramValuesString.get(i), converter)); } return serviceMethod.invoke(service, paramValues.toArray()); }
String typeString = typeElem.getStringValue(); Class type = ClassUtils.forName(typeString, null); value = ParseUtils.toObject(type, paramValue, this); } else { value = ParseUtils.tryParse(paramValue);