Package javax.ws.rs

Examples of javax.ws.rs.WebApplicationException


                            .getMessage("classInstantiationExceptionWithMsgFormat", line), e); //$NON-NLS-1$
                    }
                }
            }
        } catch (IOException e) {
            throw new WebApplicationException(e);
        } finally {
            try {
                is.close();
            } catch (IOException e) {
                if (logger.isInfoEnabled()) {
View Full Code Here


                if (e instanceof InvocationTargetException) {
                    Throwable ite = ((InvocationTargetException)e).getTargetException();
                    if (ite instanceof RuntimeException) {
                        throw (RuntimeException)ite;
                    }
                    throw new WebApplicationException(ite);
                }
                throw new WebApplicationException(e);
            }
        }

        if (HttpServletRequest.class == contextClass) {
            return (T)new HttpServletRequestWrapperImpl();
View Full Code Here

           
        } catch (JAXBException e) {
            handleJAXBException(e, true);
        } catch (XMLStreamException e) {
            if (e.getCause() instanceof JSONSequenceTooLargeException) {
                throw new WebApplicationException(413);
            } else {
                handleXMLStreamException(e, true);
            }
        } catch (WebApplicationException e) {
            throw e;
View Full Code Here

                response = unmarshaller.unmarshal(xsw);
            }
            return response;
           
        } catch (JAXBException e) {
            throw new WebApplicationException(e);        
        } catch (XMLStreamException e) {
            throw new WebApplicationException(e);
        }
    }
View Full Code Here

            XMLStreamWriter xsw = factory.createXMLStreamWriter(os);           
            ms.marshal(actualObject, xsw);
            xsw.close();
           
        } catch (JAXBException e) {
            throw new WebApplicationException(e);
        } catch (XMLStreamException e) {
            throw new WebApplicationException(e);
        }
    }
View Full Code Here

        AegisReader<XMLStreamReader> aegisReader = context.createXMLStreamReader();
        XMLStreamReader xmlStreamReader = StaxUtils.createXMLStreamReader(is);
        try {
            return aegisReader.read(xmlStreamReader);
        } catch (Exception e) {
            throw new WebApplicationException(e);
        }
    }
View Full Code Here

        XMLStreamWriter xmlStreamWriter = StaxUtils.createXMLStreamWriter(os);
        try {
            aegisWriter.write(obj, null, false, xmlStreamWriter, null);
           
        } catch (Exception e) {
            throw new WebApplicationException(e);
        }
    }
View Full Code Here

            MultivaluedMap<String, String> params = getParams(postBody);

            return params;
        } catch (Exception e) {
            throw new WebApplicationException(e);
        }
    }
View Full Code Here

            } else {
                return unmarshaller.unmarshal(is);
            }
           
        } catch (JAXBException e) {
            throw new WebApplicationException(e);       
        }
    }
View Full Code Here

                ms.setProperty(entry.getKey(), entry.getValue());
            }
            ms.marshal(actualObject, os);
           
        } catch (JAXBException e) {
            throw new WebApplicationException(e);
        }
    }
View Full Code Here

TOP

Related Classes of javax.ws.rs.WebApplicationException

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.