private Method findMethod(Object service, String methodName, Class<?>[] argTypes) { Method method; Class<?> serviceClass = retrieveRealServiceClass(service); if (serviceClass.isInstance(CustomMarshallerRealTypeAccess.class)) { serviceClass = ((CustomMarshallerRealTypeAccess) service).getRealUnproxiedType(); } method = MethodUtils.getMatchingAccessibleMethod(serviceClass, methodName, argTypes); if (method == null) { throw new IllegalArgumentException(String.format("could not find method matching arguments \"%s(%s)\"", methodName, ArrayUtils.toString(argTypes))); } return method; }