Package javax.ws.rs

Examples of javax.ws.rs.NotFoundException


                                                   message.get(Message.REQUEST_URI),
                                                   rawPath);
            LOG.warning(errorMsg.toString());
            Response resp = JAXRSUtils.createResponse(null, message, errorMsg.toString(),
                    Response.Status.NOT_FOUND.getStatusCode(), false);
            throw new NotFoundException(resp);
        }

        message.getExchange().put(JAXRSUtils.ROOT_RESOURCE_CLASS, resource);

        String httpMethod = HttpUtils.getProtocolHeader(message, Message.HTTP_REQUEST_METHOD, "POST");
View Full Code Here


                //  For path, query & matrix parameters this is 404,
                //  for others 400...
                //
                if (pType == ParameterType.PATH || pType == ParameterType.QUERY
                    || pType == ParameterType.MATRIX) {
                    throw new NotFoundException(nfe);
                }
                throw new BadRequestException(nfe);
            }
        }
       
View Full Code Here

            }
            final EventOutput eventOutput = new EventOutput();
            process.getBroadcaster().add(eventOutput);
            return eventOutput;
        } else {
            throw new NotFoundException();
        }
    }
View Full Code Here

    @Ignore
    public static class NotFoundResponseExceptionMapper implements ResponseExceptionMapper<Exception> {
       
        public Exception fromResponse(Response r) {
            if (r.getStatus() == HttpStatus.SC_NOT_FOUND) {
                return new NotFoundException();
            } else {
                return null;
            }
        }
View Full Code Here

                    org.apache.cxf.common.i18n.Message errorM =
                        new org.apache.cxf.common.i18n.Message("NO_SUBRESOURCE_FOUND",
                                                               BUNDLE,
                                                               subResourcePath);
                    LOG.severe(errorM.toString());
                    throw new NotFoundException();
                }

                OperationResourceInfo subOri = JAXRSUtils.findTargetMethod(subCri,
                                                         inMessage,
                                                         httpMethod,
View Full Code Here

            org.apache.cxf.common.i18n.Message errorM =
                new org.apache.cxf.common.i18n.Message("NULL_SUBRESOURCE",
                                                       BUNDLE,
                                                       subResourcePath);
            LOG.info(errorM.toString());
            throw new NotFoundException();
        }

        return result;
    }
View Full Code Here

        if (list.size() == 0) {
            org.apache.cxf.common.i18n.Message msg =
                new org.apache.cxf.common.i18n.Message("NO_RESOURCES_AVAILABLE",
                                                       BUNDLE);
            LOG.severe(msg.toString());
            throw new NotFoundException();
        }
    }
View Full Code Here

                                                   message.get(Message.REQUEST_URI),
                                                   rawPath);
            LOG.warning(errorMsg.toString());
            Response resp = JAXRSUtils.createResponse(null, message, errorMsg.toString(),
                    Response.Status.NOT_FOUND.getStatusCode(), false);
            throw new NotFoundException(resp);
        }

        message.getExchange().put(JAXRSUtils.ROOT_RESOURCE_CLASS, resource);

        OperationResourceInfo ori = null;    
View Full Code Here

                //  For path, query & matrix parameters this is 404,
                //  for others 400...
                //
                if (pType == ParameterType.PATH || pType == ParameterType.QUERY
                    || pType == ParameterType.MATRIX) {
                    throw new NotFoundException(nfe);
                }
                throw new BadRequestException(nfe);
            }
        }
       
View Full Code Here

      catch (Exception e) {
        String errorMessage = e.getMessage();
        if (e instanceof UnknownHostException) {
          errorMessage = "Unknown host '" + actualHost + "'";
        }
        throw new NotFoundException(errorMessage);
      }
      if (chain == null || chain.length == 0) {
        throw new NotFoundException(
            "Could not retrieve an SSL certificate from " + actualHost + ":" + actualPortInt
        );
      }

      return asCertificateXO(chain[0], isInNexusSSLTrustStore(chain[0]));
View Full Code Here

TOP

Related Classes of javax.ws.rs.NotFoundException

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.