Package javax.ws.rs

Examples of javax.ws.rs.NotSupportedException


            }
            return params;
        } catch (WebApplicationException e) {
            throw e;
        } catch (MessageBodyProviderNotFoundException e) {
            throw new NotSupportedException(e);
        } catch (ProcessingException e) {
            throw e;
        } catch (RuntimeException e) {
            throw new MappableException("Exception obtaining parameters", e);
        }
View Full Code Here


                satisfyingAcceptors.add(cpi);
                differentInvokableMethods.add(cpi.methodAcceptorPair.model);
            }
        }
        if (satisfyingAcceptors.isEmpty()) {
            throw new NotSupportedException();
        }

        final List<MediaType> acceptableMediaTypes = request.getAcceptableMediaTypes();

        final MediaType requestContentType = request.getMediaType();
View Full Code Here

                    break;
                case NOT_ACCEPTABLE:
                    webAppException = new NotAcceptableException(response);
                    break;
                case UNSUPPORTED_MEDIA_TYPE:
                    webAppException = new NotSupportedException(response);
                    break;
                case INTERNAL_SERVER_ERROR:
                    webAppException = new InternalServerErrorException(response);
                    break;
                case SERVICE_UNAVAILABLE:
View Full Code Here

                    org.apache.cxf.common.i18n.Message errorMsg =
                        new org.apache.cxf.common.i18n.Message("WRONG_FORM_MEDIA_TYPE",
                                                               BUNDLE,
                                                               mt.toString());
                    LOG.warning(errorMsg.toString());
                    throw new NotSupportedException();
                }
            }
        }
       
        if ("".equals(key)) {
View Full Code Here

                    MultivaluedMap<String, String> headers, InputStream is)
        throws IOException, WebApplicationException {
        MessageBodyReader<org.w3c.dom.Document> reader =
            providers.getMessageBodyReader(DOM_DOC_CLS, DOM_DOC_CLS, anns, mt);
        if (reader == null) {
            throw new NotSupportedException();
        }
        org.w3c.dom.Document domDoc =
            reader.readFrom(DOM_DOC_CLS, DOM_DOC_CLS, anns, mt, headers, is);
        return new org.dom4j.io.DOMReader().read(domDoc);
    }
View Full Code Here

        return map;
    }
   
    private static void checkMediaTypes(MediaType mt1, String mt2) {
        if (!mt1.isCompatible(JAXRSUtils.toMediaType(mt2))) {                                           
            throw new NotSupportedException();
        }
    }
View Full Code Here

                        MediaType mt, MultivaluedMap<String, Object> headers, OutputStream os)
        throws IOException {
        if (MediaType.APPLICATION_JSON_TYPE.isCompatible(mt)) {
            Writer w = createWriter("json");
            if (w == null) {
                throw new NotSupportedException();
            }
            element.writeTo(w, os);  
        } else if (formattedOutput) {
            Writer w = createWriter("prettyxml");
            if (w != null) {
View Full Code Here

       
        MediaType requestType;
        try {
            requestType = toMediaType(requestContentType);
        } catch (IllegalArgumentException ex) {
            throw new NotSupportedException(ex);
        }
       
        SortedMap<OperationResourceInfo, MultivaluedMap<String, String>> candidateList =
            new TreeMap<OperationResourceInfo, MultivaluedMap<String, String>>(
                new OperationResourceInfoComparator(message, httpMethod,
View Full Code Here

        MediaType requestType;
        try {
            requestType = requestContentType == null
                                ? ALL_TYPES : MediaType.valueOf(requestContentType);
        } catch (IllegalArgumentException ex) {
            throw new NotSupportedException(ex);
        }

        int pathMatched = 0;
        int methodMatched = 0;
        int consumeMatched = 0;
View Full Code Here

                    org.apache.cxf.common.i18n.Message errorMsg =
                        new org.apache.cxf.common.i18n.Message("WRONG_FORM_MEDIA_TYPE",
                                                               BUNDLE,
                                                               mt.toString());
                    LOG.warning(errorMsg.toString());
                    throw new NotSupportedException();
                }
            }
        }
       
        if ("".equals(key)) {
View Full Code Here

TOP

Related Classes of javax.ws.rs.NotSupportedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.