Package org.apache.cxf.interceptor

Examples of org.apache.cxf.interceptor.Fault


       
        String id;
        try {
            id = AttachmentUtil.createContentID(elementNS);
        } catch (UnsupportedEncodingException e) {
            throw new Fault(e);
        }
        AttachmentImpl att = new AttachmentImpl(id, handler);
        if (!StringUtils.isEmpty(handler.getName())) {
            //set Content-Disposition attachment header if filename isn't null
            String file = handler.getName();
View Full Code Here


            return loadDataSource(contentId, atts);
        } else {
            try {
                return new URLDataSource(new URL(contentId));
            } catch (MalformedURLException e) {
                throw new Fault(e);
            }
        }
       
    }
View Full Code Here

           
        } 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

            updateForm(form, encodedToken);
        } 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

            MethodDispatcher md = (MethodDispatcher)
                exchange.get(Service.class).get(MethodDispatcher.class.getName());
            Method m = bop == null ? null : md.getMethod(bop);
            if (m == null && bop == null) {
                LOG.severe(new Message("MISSING_BINDING_OPERATION", LOG).toString());
                throw new Fault(new Message("EXCEPTION_INVOKING_OBJECT", LOG,
                                             "No binding operation info", "unknown method", "unknown"));
            }
            List<Object> params = null;
            if (o instanceof List) {
                params = CastUtils.cast((List<?>)o);
View Full Code Here

    }
   
    protected Fault createFault(Throwable ex, Method m, List<Object> params, boolean checked) {
       
        if (checked) {
            return new Fault(ex);
        } else {
            String message = (ex == null) ? "" : ex.getMessage();
            String method = (m == null) ? "<null>" : m.toString();
            return new Fault(new Message("EXCEPTION_INVOKING_OBJECT", LOG,
                                         message, method, params),
                                         ex);
        }
    }
View Full Code Here

            return false;
        }
        reader2.setValidationProblemHandler(new ValidationProblemHandler() {

            public void reportProblem(XMLValidationProblem problem) throws XMLValidationException {
                throw new Fault(new Message("READ_VALIDATION_ERROR", LOG, problem.getMessage()),
                                Fault.FAULT_CODE_CLIENT);
            }
        });
        reader2.validateAgainst(vs);
        return true;
View Full Code Here

            return false;
        }
        writer2.setValidationProblemHandler(new ValidationProblemHandler() {

            public void reportProblem(XMLValidationProblem problem) throws XMLValidationException {
                throw new Fault(problem.getMessage(), LOG);
            }
        });
        writer2.validateAgainst(vs);
        return true;
    }
View Full Code Here

                    }
                } else {
                    getLogger().warning("ConduitInitiatorManager not found");
                }
            } catch (BusException ex) {
                throw new Fault(ex);
            } catch (IOException ex) {
                throw new Fault(ex);
            }
            conduits.add(c);
        }
        if (c != null && c.getTarget() != null && c.getTarget().getAddress() != null) {
            replaceEndpointAddressPropertyIfNeeded(message, c.getTarget().getAddress().getValue(), c);
View Full Code Here

        LOG.log(Level.FINE, "Activating receipt of incoming messages");
        URL url = null;
        try {
            url = new URL(endpointInfo.getAddress());
        } catch (Exception e) {
            throw new Fault(e);
        }
        engine.addServant(url,
                          new JettyHTTPHandler(this, contextMatchOnExact()));
    }
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.