Package org.apache.cxf.interceptor

Examples of org.apache.cxf.interceptor.Fault


            Transformer trans = xsltTemplate.newTransformer();
            trans.transform(beforeSource, new StreamResult(outWriter));

            return outWriter.getReader();
        } catch (IOException e) {
            throw new Fault("GET_CACHED_INPUT_STREAM", LOG, e, e.getMessage());
        } catch (TransformerException e) {
            throw new Fault("XML_TRANSFORM", LOG, e, e.getMessage());
        }
    }
View Full Code Here


            Transformer trans = xsltTemplate.newTransformer();
            trans.transform(beforeSource, new DOMResult(out));

            return out;
        } catch (TransformerException e) {
            throw new Fault("XML_TRANSFORM", LOG, e, e.getMessage());
        }
    }
View Full Code Here

            });
        } catch (PrivilegedActionException e) {
            if (e.getException() instanceof RuntimeException) {
                throw (RuntimeException)e.getException();
            }
            throw new Fault(e);
        }
    }
View Full Code Here

            });
        } catch (PrivilegedActionException e) {
            if (e.getException() instanceof RuntimeException) {
                throw (RuntimeException)e.getException();
            }
            throw new Fault(e);
        }
    }
View Full Code Here

            return assertion;
        } catch (Exception ex) {
            StringWriter sw = new StringWriter();
            ex.printStackTrace(new PrintWriter(sw));
            LOG.warning(sw.toString());
            throw new Fault(new RuntimeException(ex.getMessage() + ", stacktrace: " + sw.toString()));
        }
       
    }
View Full Code Here

            return assertion;
        } catch (Exception ex) {
            StringWriter sw = new StringWriter();
            ex.printStackTrace(new PrintWriter(sw));
            LOG.warning(sw.toString());
            throw new Fault(new RuntimeException(ex.getMessage() + ", stacktrace: " + sw.toString()));
        }
       
    }
View Full Code Here

   
    protected void checkRegistedContext(URL url) {
        String path = url.getPath();
        for (String registedPath : registedPaths) {
            if (path.equals(registedPath)) {
                throw new Fault(new Message("ADD_HANDLER_CONTEXT_IS_USED_MSG", LOG, url, registedPath));
            }
            // There are some context path conflicts which could cause the JettyHTTPServerEngine
            // doesn't route the message to the right JettyHTTPHandler
            if (path.equals(HttpUriMapper.getContextName(registedPath))) {
                throw new Fault(new Message("ADD_HANDLER_CONTEXT_IS_USED_MSG", LOG, url, registedPath));
            }
            if (registedPath.equals(HttpUriMapper.getContextName(path))) {
                throw new Fault(new Message("ADD_HANDLER_CONTEXT_CONFILICT_MSG", LOG, url, registedPath));
            }
        }
    }
View Full Code Here

                    server.destroy();
                } catch (Exception ex) {
                    //ignore - probably wasn't fully started anyway
                }
                server = null;
                throw new Fault(new Message("START_UP_SERVER_FAILED_MSG", LOG, e.getMessage(), port), e);
            }
        }       
       
        String contextName = HttpUriMapper.getContextName(url.getPath());           
        ContextHandler context = new ContextHandler();
View Full Code Here

            //threads for the acceptors and selectors are taken from
            //the pool so we need to have room for those
            int acc = aconn.getAcceptors() * 2;
            if (getThreadingParameters().isSetMaxThreads()
                && getThreadingParameters().getMaxThreads() <= acc) {
                throw new Fault(new Message("NOT_ENOUGH_THREADS", LOG,
                                            port,
                                            acc + 1,
                                            getThreadingParameters().getMaxThreads(),
                                            acc));
            }
View Full Code Here

        String id;
        try {
            id = AttachmentUtil.createContentID(elementNS);
        } catch (UnsupportedEncodingException e) {
            throw new Fault(e);
        }
        AttachmentImpl att = new AttachmentImpl(id, handler);
        att.setXOP(isXop);
        return att;
    }
View Full Code Here

TOP

Related Classes of org.apache.cxf.interceptor.Fault

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.