protected void checkClientException(Message outMessage, Exception ex) throws Exception { Throwable actualEx = ex instanceof Fault ? ((Fault)ex).getCause() : ex; Exchange exchange = outMessage.getExchange(); Integer responseCode = getResponseCode(exchange); if (responseCode == null || responseCode < 300 && !(actualEx instanceof IOException) || actualEx instanceof IOException && exchange.get("client.redirect.exception") != null) { if (actualEx instanceof ProcessingException) { throw (RuntimeException)actualEx; } else if (actualEx != null) { Object useProcExProp = exchange.get("wrap.in.processing.exception"); if (actualEx instanceof RuntimeException && useProcExProp != null && PropertyUtils.isFalse(useProcExProp)) { throw (Exception)actualEx; } throw new ProcessingException(actualEx); } else if (!exchange.isOneWay() || cfg.isResponseExpectedForOneway()) { waitForResponseCode(exchange); } } }
protected void checkClientException(Message outMessage, Exception ex) throws Exception { Throwable actualEx = ex instanceof Fault ? ((Fault)ex).getCause() : ex; Integer responseCode = getResponseCode(outMessage.getExchange()); if (responseCode == null || actualEx instanceof IOException && outMessage.getExchange().get("client.redirect.exception") != null) { if (actualEx instanceof ClientException) { throw ex; } else if (actualEx != null) { throw new ClientException(actualEx); } else if (!outMessage.getExchange().isOneWay() || cfg.isResponseExpectedForOneway()) { waitForResponseCode(outMessage.getExchange()); } } }
protected void checkClientException(Message outMessage, Exception ex) throws Exception { Throwable actualEx = ex instanceof Fault ? ((Fault)ex).getCause() : ex; Exchange exchange = outMessage.getExchange(); Integer responseCode = getResponseCode(exchange); if (responseCode == null || responseCode < 300 && !(actualEx instanceof IOException) || actualEx instanceof IOException && exchange.get("client.redirect.exception") != null) { if (actualEx instanceof ProcessingException) { throw (RuntimeException)actualEx; } else if (actualEx != null) { Object useProcExProp = exchange.get("wrap.in.processing.exception"); if (actualEx instanceof RuntimeException && useProcExProp != null && PropertyUtils.isFalse(useProcExProp)) { throw (Exception)actualEx; } throw new ProcessingException(actualEx); } else if (!exchange.isOneWay() || cfg.isResponseExpectedForOneway()) { waitForResponseCode(exchange); } } }