/** * A helper method which fails and completes the given exchange with the specified fault */ public void fail(MessageExchange exchange, Fault fault) throws MessagingException { exchange.setFault(fault); getDeliveryChannel().send(exchange); }
@Override protected void processInOut(MessageExchange exchange, NormalizedMessage in, NormalizedMessage out) throws Exception { Fault fault = exchange.createFault(); this.startValidation(exchange, in, out, fault); if (fault.getContent() != null) { exchange.setFault(fault); } }
/** * 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); }
/** * A helper method which fails and completes the given exchange with the specified error * @throws MessagingException */ 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); }
/** * 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); }
/** * 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); }
/** * A helper method which fails and completes the given exchange with the specified error * @throws MessagingException */ 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); }
private void faultProcess(MessageExchange exchange, Message message, Exception e) throws MessagingException { javax.jbi.messaging.Fault fault = exchange.createFault(); if (e.getCause() != null) { if (isUseJBIWrapper()) { handleJBIFault(message, e.getCause().getMessage()); } else { handleSoapFault(message, e.getCause().getMessage(), exchange); } } else { if (isUseJBIWrapper()) { handleJBIFault(message, e.getMessage()); } else { handleSoapFault(message, e.getMessage(), exchange); } } fault.setContent(message.getContent(Source.class)); exchange.setFault(fault); boolean txSync = exchange.getStatus() == ExchangeStatus.ACTIVE && exchange.isTransacted() && Boolean.TRUE.equals(exchange .getProperty(JbiConstants.SEND_SYNC)); if (txSync) { getContext().getDeliveryChannel().sendSync(exchange); } else { getContext().getDeliveryChannel().send(exchange); } }
public void onFailure(Exchange exchange) { MessageExchange me = JbiBinding.getMessageExchange(exchange); try { if (exchange.hasOut() && exchange.getOut().isFault()) { Fault fault = me.createFault(); binding.copyFromCamelToJbi(exchange.getOut(), fault); if (isFaultCapable(me)) { me.setFault(fault); doSend(me); } else { // MessageExchange is not capable of conveying faults -- sending the information as an error instead fail(me, new FaultException("Fault occured for " + exchange.getPattern() + " exchange", me, fault)); } } else { fail(me, binding.extractException(exchange)); } } catch (MessagingException e) { logger.warn("Unable to send JBI MessageExchange after successful Camel route invocation: {}", me, e); } } }
Fault fault = xchng.createFault(); fault.setContent(new DOMSource(doc)); xchng.setFault(fault); if (!f.hasDetails()) { xchng.setProperty("faultstring", f.getMessage());
Fault fault = xchng.createFault(); fault.setContent(new DOMSource(doc)); xchng.setFault(fault); if (!f.hasDetails()) { xchng.setProperty("faultstring", f.getMessage());
if (fault == null) { fault = exchange.createFault(); exchange.setFault(fault);
httpExchange.getResponseFields().getStringField(HttpHeaders.CONTENT_ENCODING), httpExchange.getResponseStream()))); exchange.setFault(fault); } else { throw new Exception("Invalid status response: " + response);
exchange.setMessage(nm, "out"); } else { exchange.setFault(exchange.createFault()); nm = exchange.getFault();
exchange.setFault(exchange.createFault()); nm = exchange.getFault();
fault.setProperty(JbiConstants.PROTOCOL_HEADERS, getHeaders(method)); soapHelper.getJBIMarshaler().toNMS(fault, soapMessage); exchange.setFault(fault); if (txSync) { channel.sendSync(exchange);
if (fault == null) { fault = exchange.createFault(); exchange.setFault(fault);
store.store(exchange.getExchangeId(), exchange); org.setFault(org.createFault()); transform(exchange, exchange.getFault(), org, org.getFault(), FAULT);
concrete.setFault( (javax.jbi.messaging.Fault) Convert.convertFakeToConcreteNormalizedMessage(concrete,
fake.setFault( (javax.jbi.messaging.Fault) Convert.convertConcreteToFakeNormalizedMessage(