response = client.invoke(httpMethod, body);
} else if (Collection.class.isAssignableFrom(responseClass)) {
if (genericType instanceof ParameterizedType) {
// Get the collection member type first
Type[] actualTypeArguments = ((ParameterizedType) genericType).getActualTypeArguments();
response = client.invokeAndGetCollection(httpMethod, body, (Class)actualTypeArguments[0]);
} else {
throw new CamelException("Can't find the Collection member type");
}
} else {
response = client.invoke(httpMethod, body, responseClass);