Package org.apache.servicemix.jbi

Examples of org.apache.servicemix.jbi.FaultException


                     */
                    fault.setContent(new DOMSource(result.getNode(), result.getSystemId()));
                }
                if (!handlingErrorMethod.equalsIgnoreCase(FAULT_FLOW)) {
                  // HANDLE AS JBI FAULT
                  throw new FaultException("Failed to validate against schema: " + schema, exchange, fault);
                } else {
                  MessageUtil.transfer(fault, out);
                  return true;
                }
            }
View Full Code Here


                exchange.setStatus(ExchangeStatus.DONE);
                getDeliveryChannel().send(exchange);
                if (exchange.getError() != null) {
                    throw new MessagingException("Received error", exchange.getError());
                } else if (exchange.getFault() != null) {
                    throw new FaultException("Received fault", exchange, exchange.getFault());
                } else {
                    throw new MessagingException("Received unknown error");
                }
            } else {
                NormalizedMessage out = exchange.getOutMessage();
View Full Code Here

    /**
     * A helper method which fails and completes the given exchange with the specified fault
     */
    public void fail(MessageExchange exchange, Fault fault) throws MessagingException {
        if (exchange instanceof InOnly || fault == null) {
            exchange.setError(new FaultException("Fault occured for in-only exchange", exchange, fault));
        } else {
            exchange.setFault(fault);
        }
        getDeliveryChannel().send(exchange);
    }
View Full Code Here

     */
    public void fail(MessageExchange exchange, Exception error) throws MessagingException {
        if (exchange instanceof InOnly || !(error instanceof FaultException)) {
            exchange.setError(error);
        } else {
            FaultException faultException = (FaultException) error;
            exchange.setFault(faultException.getFault());
        }
        getDeliveryChannel().send(exchange);
    }
View Full Code Here

                     */
                    fault.setContent(new DOMSource(result.getNode(), result.getSystemId()));
                }
                if (!handlingErrorMethod.equalsIgnoreCase(FAULT_FLOW)) {
                  // HANDLE AS JBI FAULT
                  throw new FaultException("Failed to validate against schema: " + schema, exchange, fault);
                } else {
                  MessageUtil.transfer(fault, out);
                  return true;
                }
            }
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 {
        if (error instanceof FaultException) {
            FaultException faultException = (FaultException) error;
            exchange.setFault(faultException.getFault());
        } else {
            exchange.setError(error);
        }
        getDeliveryChannel().send(exchange);
    }
View Full Code Here

    }
    protected NormalizedMessage extract(MessageExchange me) throws ExecutionException {
        if (me.getStatus() == ExchangeStatus.ERROR) {
            throw new ExecutionException(me.getError());
        } else if (me.getFault() != null) {
            throw new ExecutionException(new FaultException("Fault occured", me, me.getFault()));
        } else {
            return me.getMessage("out");
        }
    }
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 {
        if (error instanceof FaultException) {
            FaultException faultException = (FaultException) error;
            exchange.setFault(faultException.getFault());
        } else {
            exchange.setError(error);
        }
        getDeliveryChannel().send(exchange);
    }
View Full Code Here

                exchange.setStatus(ExchangeStatus.DONE);
                getDeliveryChannel().send(exchange);
                if (exchange.getError() != null) {
                    throw new MessagingException("Received error", exchange.getError());
                } else if (exchange.getFault() != null) {
                    throw new FaultException("Received fault", exchange, exchange.getFault());
                } else {
                    throw new MessagingException("Received unknown error");
                }
            } else {
                NormalizedMessage out = exchange.getOutMessage();
View Full Code Here

    /**
     * A helper method which fails and completes the given exchange with the specified fault
     */
    public void fail(MessageExchange exchange, Fault fault) throws MessagingException {
        if (exchange instanceof InOnly || fault == null) {
            exchange.setError(new FaultException("Fault occured for in-only exchange", exchange, fault));
        } else {
            exchange.setFault(fault);
        }
        getDeliveryChannel().send(exchange);
    }
View Full Code Here

TOP

Related Classes of org.apache.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.