Package javax.ws.rs

Examples of javax.ws.rs.InternalServerErrorException


        } catch (JAXBException e) {
            handleJAXBException(e, false);
        } catch (XMLStreamException e) {
            handleXMLStreamException(e, false);
        } catch (Exception e) {
            throw new InternalServerErrorException(e);
        } finally {
            StaxUtils.close(writer);
        }
    }
View Full Code Here


            xsw.flush();
            xsw.close();

        } catch (XMLStreamException e) {
            throw new InternalServerErrorException(e);
        } catch (IOException ioe) {
            throw new InternalServerErrorException(ioe);
        }
    }
View Full Code Here

                atomElement = createFeedFromCollectionWrapper(factory, o, cls);
            } else if (!isFeed && !isCollection) {
                atomElement = createEntryFromObject(factory, o, cls);
            }
        } catch (Exception ex) {
            throw new InternalServerErrorException(ex);
        }
       
        try {
            writeAtomElement(atomElement, os);
        } catch (IOException ex) {
View Full Code Here

            if (obj instanceof XmlObject) {
                result = (XmlObject)obj;
            }

        } catch (NoSuchMethodException nsme) {
            throw new InternalServerErrorException(nsme);
        } catch (InvocationTargetException ite) {
            throw new InternalServerErrorException(ite);
        } catch (IllegalAccessException iae) {
            throw new InternalServerErrorException(iae);
        }

        return result;
    }
View Full Code Here

            if (mbr != null) {
                try {
                    return mbr.readFrom(cls, cls, new Annotation[]{}, getContentType(),
                                        headers, getDataHandler().getInputStream());
                } catch (Exception ex) {
                    throw new InternalServerErrorException(ex);
                }
            }
        }
        return null;
    }
View Full Code Here

    @POST
    @Consumes("text/plain")
    @Produces("text/plain")
    @Path("request_exception")
    public String exceptionInRequestFilter() {
        throw new InternalServerErrorException();        // should not reach here
    }
View Full Code Here

            // Jettison needs, and StaxUtils.copy doesn't do it.
            xmlStreamWriter.writeEndDocument();
            xmlStreamWriter.flush();
            xmlStreamWriter.close();
        } catch (Exception e) {
            throw new InternalServerErrorException(e);
        }
    }
View Full Code Here

            xmlStreamWriter.writeStartDocument();
            aegisWriter.write(obj, aegisType.getSchemaType(), false, xmlStreamWriter, aegisType);
            xmlStreamWriter.writeEndDocument();
            xmlStreamWriter.close();
        } catch (Exception e) {
            throw new InternalServerErrorException(e);
        }
    }
View Full Code Here

                }
            }
        }
       
        if (name == null) {
            throw new InternalServerErrorException();
        }
       
        return "{\"" + name + "\":";
    }
View Full Code Here

        } catch (JAXBException e) {
            handleJAXBException(e, false);
        } catch (XMLStreamException e) {
            handleXMLStreamException(e, false);
        } catch (Exception e) {
            throw new InternalServerErrorException(e);
        } finally {
            StaxUtils.close(writer);
        }
    }
View Full Code Here

TOP

Related Classes of javax.ws.rs.InternalServerErrorException

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.