private Method getResourceMethod(Message m, String httpMethod) { String requestUri = HttpUtils.getPathToMatch(m, true); List<ClassResourceInfo> resources = JAXRSUtils.getRootResources(m); Map<ClassResourceInfo, MultivaluedMap<String, String>> matchedResources = JAXRSUtils.selectResourceClass(resources, requestUri, m); if (matchedResources == null) { return null; } MultivaluedMap<String, String> values = new MetadataMap<>(); OperationResourceInfo ori = findPreflightMethod(matchedResources, requestUri, httpMethod, values, m); return ori == null ? null : ori.getAnnotatedMethod(); }
private Method getResourceMethod(Message m, String httpMethod) { String requestUri = HttpUtils.getPathToMatch(m, true); List<ClassResourceInfo> resources = JAXRSUtils.getRootResources(m); Map<ClassResourceInfo, MultivaluedMap<String, String>> matchedResources = JAXRSUtils.selectResourceClass(resources, requestUri, m); if (matchedResources == null) { return null; } MultivaluedMap<String, String> values = new MetadataMap<>(); OperationResourceInfo ori = findPreflightMethod(matchedResources, requestUri, httpMethod, values, m); return ori == null ? null : ori.getAnnotatedMethod(); }
private Method getPreflightMethod(Message m, String httpMethod) { String requestUri = HttpUtils.getPathToMatch(m, true); Service service = m.getExchange().get(Service.class); List<ClassResourceInfo> resources = ((JAXRSServiceImpl)service).getClassResourceInfos(); MultivaluedMap<String, String> values = new MetadataMap<String, String>(); ClassResourceInfo resource = JAXRSUtils.selectResourceClass(resources, requestUri, values, m); if (resource == null) { return null; } OperationResourceInfo ori = findPreflightMethod(resource, requestUri, httpMethod, values, m); return ori == null ? null : ori.getAnnotatedMethod(); }
JAXRSUtils.selectResourceClass(resources, rawPath, message); if (matchedResources == null) { org.apache.cxf.common.i18n.Message errorMsg =
ClassResourceInfo resource = JAXRSUtils.selectResourceClass(resources, rawPath, values,