Package org.servicemix.jbi

Examples of org.servicemix.jbi.FaultException


    }

    protected void fail(MessageExchange exchange, Exception error) throws MessagingException {
        exchange.setError(error);
        if (error instanceof FaultException) {
            FaultException faultException = (FaultException) error;
            exchange.setFault(faultException.getFault());
        }
        exchange.setStatus(ExchangeStatus.ERROR);
        getDeliveryChannel().send(exchange);
    }
View Full Code Here


            validator.validate(src, result);
            if (errorHandler.hasErrors()) {
                Fault fault = exchange.createFault();
                fault.setProperty("org.servicemix.schema", schema);
                fault.setContent(new DOMSource(result.getNode(), result.getSystemId()));
                throw new FaultException("Failed to validate against schema: " + schema, exchange, fault);
            }
            else {
              // Retrieve the ouput of the validation
              // as it may have been changed by the validator
              out.setContent(new DOMSource(result.getNode(), result.getSystemId()));
View Full Code Here

            log.error("Error processing exchange", error);
            exchange.setStatus(ExchangeStatus.DONE);
        } else {
            exchange.setError(error);
            if (error instanceof FaultException) {
                FaultException faultException = (FaultException) error;
                exchange.setFault(faultException.getFault());
            }
        }
        getDeliveryChannel().send(exchange);
    }
View Full Code Here

     * A helper method which fails and completes the given exchange with the specified error
     */
    public void fail(MessageExchange exchange, Exception error) throws MessagingException {
        exchange.setError(error);
        if (error instanceof FaultException) {
            FaultException faultException = (FaultException) error;
            exchange.setFault(faultException.getFault());
        }
        getDeliveryChannel().send(exchange);
    }
View Full Code Here

TOP

Related Classes of org.servicemix.jbi.FaultException

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.