Package javax.ws.rs

Examples of javax.ws.rs.BadRequestException


                handleXMLStreamException(e, true);
            }
        } catch (WebApplicationException e) {
            throw e;
        } catch (Exception e) {
            throw new BadRequestException(e);
        } finally {
            StaxUtils.close(reader);
        }
        // unreachable
        return null;
View Full Code Here


                    new org.apache.cxf.common.i18n.Message("MULTTIPART_ID_NOT_FOUND",
                                                           BUNDLE,
                                                           id.value(),
                                                           mt.toString());
                LOG.warning(errorMsg.toString());
                throw new BadRequestException(
                          new MultipartReadException(id.value(), id.type(), errorMsg.toString()));
            } else {
                return null;
            }
        }
View Full Code Here

                //
                if (pType == ParameterType.PATH || pType == ParameterType.QUERY
                    || pType == ParameterType.MATRIX) {
                    throw new NotFoundException(nfe);
                }
                throw new BadRequestException(nfe);
            }
        }
       
        boolean adapterHasToBeUsed = false;
        Class<?> cls = pClass;       
View Full Code Here

             * If user asked for a null, give them a null.
             */
            return null;
        }
       
        throw new BadRequestException();
       
    }
View Full Code Here

                handleXMLStreamException(e, true);
            }
        } catch (WebApplicationException e) {
            throw e;
        } catch (Exception e) {
            throw new BadRequestException(e);
        } finally {
            StaxUtils.close(reader);
        }
        // unreachable
        return null;
View Full Code Here

    }
   
    protected void reportEmptyContentLength() {
        String message = new org.apache.cxf.common.i18n.Message("EMPTY_BODY", BUNDLE).toString();
        LOG.warning(message);
        throw new BadRequestException();
    }
View Full Code Here

    protected static void handleExceptionEnd(Throwable t, String message, boolean read) {
        Response.Status status = read
            ? Response.Status.BAD_REQUEST : Response.Status.INTERNAL_SERVER_ERROR;
        Response r = Response.status(status)
            .type(MediaType.TEXT_PLAIN).entity(message).build();
        throw read ? new BadRequestException(r, t) : new InternalServerErrorException(r, t);
    }
View Full Code Here

                //
                if (pType == ParameterType.PATH || pType == ParameterType.QUERY
                    || pType == ParameterType.MATRIX) {
                    throw new NotFoundException(nfe);
                }
                throw new BadRequestException(nfe);
            }
        }
       
        boolean adapterHasToBeUsed = false;
        Class<?> cls = pClass;       
View Full Code Here

                    return Response.ok().type(MediaType.APPLICATION_XML_TYPE).entity(new DOMSource(docEl))
                        .build();
                }
            } catch (Exception ex) {
                throw new BadRequestException();
            }

        }
        return null;
    }
View Full Code Here

                //
                if (pType == ParameterType.PATH || pType == ParameterType.QUERY
                    || pType == ParameterType.MATRIX) {
                    throw new NotFoundException(nfe);
                }
                throw new BadRequestException(nfe);
            }
        }
       
        boolean adapterHasToBeUsed = false;
        Class<?> cls = pClass;       
View Full Code Here

TOP

Related Classes of javax.ws.rs.BadRequestException

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.