class XmlRootElementEndpointMapping extends AbstractAnnotationMethodEndpointMapping<QName> {

	@Override
	protected QName getLookupKeyForMethod(Method method) {
		Class<?>[] parameterTypes = method.getParameterTypes();
		for (int i = 0; i < parameterTypes.length; i++) {
			MethodParameter methodParameter = new MethodParameter(method, i);
			Class<?> parameterType = methodParameter.getParameterType();
			if (parameterType.isAnnotationPresent(XmlRootElement.class)) {
				QName result = handleRootElement(parameterType);
				if (result != null) {
					return result;
				}
			}

		}
		return null;
	}

}