protected Message getInBoundMessage(Exchange ex) { return (ex.getInFaultMessage() != null) ? ex.getInFaultMessage() : ex.getInMessage(); }
protected Message getInBoundMessage(Exchange ex) { return (ex.getInFaultMessage() != null) ? ex.getInFaultMessage() : ex.getInMessage(); }
m = exchange.getInFaultMessage(); if (m == null) { m = exchange.getInMessage();
private Message getResponseMessage() { Message responseMessage = outMessage.getExchange().getInMessage(); if (responseMessage == null) { responseMessage = outMessage.getExchange().getInFaultMessage(); } return responseMessage; }
protected Exception getException(Exchange exchange) { if (exchange.getInFaultMessage() != null) { return exchange.getInFaultMessage().getContent(Exception.class); } else if (exchange.getOutFaultMessage() != null) { return exchange.getOutFaultMessage().getContent(Exception.class); } else if (exchange.getInMessage() != null) { return exchange.getInMessage().getContent(Exception.class); } return null; }
protected Exception getException(Exchange exchange) { if (exchange.getInFaultMessage() != null) { return exchange.getInFaultMessage().getContent(Exception.class); } else if (exchange.getOutFaultMessage() != null) { return exchange.getOutFaultMessage().getContent(Exception.class); } else if (exchange.getInMessage() != null) { return exchange.getInMessage().getContent(Exception.class); } return null; }
protected Exception getException(Exchange exchange) { if (exchange.getInFaultMessage() != null) { return exchange.getInFaultMessage().getContent(Exception.class); } else if (exchange.getOutFaultMessage() != null) { return exchange.getOutFaultMessage().getContent(Exception.class); } else if (exchange.getInMessage() != null) { return exchange.getInMessage().getContent(Exception.class); } return null; }
protected Exception getException(Exchange exchange) { if (exchange.getInFaultMessage() != null) { return exchange.getInFaultMessage().getContent(Exception.class); } else if (exchange.getOutFaultMessage() != null) { return exchange.getOutFaultMessage().getContent(Exception.class); } else if (exchange.getInMessage() != null) { return exchange.getInMessage().getContent(Exception.class); } return null; }
/** * Determine if message is fault. * * @param message the current Message * @return true iff the message is a fault */ public static boolean isFault(Message message) { return message != null && message.getExchange() != null && (message == message.getExchange().getInFaultMessage() || message == message.getExchange().getOutFaultMessage()); }
/** * Determine if message is fault. * * @param message the current Message * @return true iff the message is a fault */ public static boolean isFault(Message message) { return message != null && message.getExchange() != null && (message == message.getExchange().getInFaultMessage() || message == message.getExchange().getOutFaultMessage()); }
/** * Determine if message is fault. * * @param message the current Message * @return true if the message is a fault */ public static boolean isFault(Message message) { return message != null && message.getExchange() != null && (message == message.getExchange().getInFaultMessage() || message == message.getExchange() .getOutFaultMessage()); }
/** * Determine if message is fault. * * @param message the current Message * @return true if the message is a fault */ public static boolean isFault(Message message) { return message != null && message.getExchange() != null && (message == message.getExchange().getInFaultMessage() || message == message.getExchange() .getOutFaultMessage()); }
/** * Determine if message is fault. * * @param message the current Message * @return true if the message is a fault */ public static boolean isFault(Message message) { return message != null && message.getExchange() != null && (message == message.getExchange().getInFaultMessage() || message == message.getExchange() .getOutFaultMessage()); }
/** * Determine if message is fault. * * @param message the current Message * @return true if the message is a fault */ public static boolean isFault(Message message) { return message != null && message.getExchange() != null && (message == message.getExchange().getInFaultMessage() || message == message.getExchange() .getOutFaultMessage()); }
/** * Determine if message is fault. * * @param message the current Message * @return true iff the message is a fault */ public static boolean isFault(Message message) { return message != null && message.getExchange() != null && (message == message.getExchange().getInFaultMessage() || message == message.getExchange().getOutFaultMessage()); }
/** * Determine if message is fault. * * @param message the current Message * @return true iff the message is a fault */ public static boolean isFault(Message message) { return message != null && message.getExchange() != null && (message == message.getExchange().getInFaultMessage() || message == message.getExchange().getOutFaultMessage()); }
public static Exception getException(Exchange exchange) { Exception throwable = exchange.get(Exception.class); if (exchange.getInFaultMessage() != null) { return exchange.getInFaultMessage().getContent(Exception.class); } else if (exchange.getOutFaultMessage() != null) { return exchange.getOutFaultMessage().getContent(Exception.class); } if (throwable != null) { return throwable; } throwable = getException(exchange.getOutMessage()); if (throwable != null) { return throwable; } throwable = getException(exchange.getInMessage()); if (throwable != null) { return throwable; } return null; }
public void close(Message msg) throws IOException { super.close(msg); if (msg.getExchange().isOneWay() || msg.getExchange().getInMessage() == msg || msg.getExchange().getInFaultMessage() == msg) { String s = (String)msg.getExchange().get(HOST_PORT); ConnectFuture c = msg.getExchange().get(ConnectFuture.class); if (s != null && c != null) { c.getSession().removeAttribute(CXF_MESSAGE_ATTR); Queue<ConnectFuture> q = connections.get(s); if (q == null) { connections.putIfAbsent(s, new ArrayBlockingQueue<ConnectFuture>(10)); q = connections.get(s); } if (!q.offer(c)) { c.getSession().closeOnFlush(); } } } } public void close() {
protected void initializeInterceptors(Exchange ex, PhaseInterceptorChain chain) { Endpoint e = ex.getEndpoint(); Client c = ex.get(Client.class); InterceptorProvider ip = ex.get(InterceptorProvider.class); chain.add(getBus().getInFaultInterceptors()); if (c != null) { chain.add(c.getInFaultInterceptors()); } else if (ip != null) { chain.add(ip.getInFaultInterceptors()); } chain.add(e.getService().getInFaultInterceptors()); chain.add(e.getInFaultInterceptors()); chain.add(e.getBinding().getInFaultInterceptors()); if (e.getService().getDataBinding() instanceof InterceptorProvider) { chain.add(((InterceptorProvider)e.getService().getDataBinding()).getInFaultInterceptors()); } addToChain(chain, ex.getInFaultMessage()); addToChain(chain, ex.getOutMessage()); } private void addToChain(PhaseInterceptorChain chain, Message m) {
protected void initializeInterceptors(Exchange ex, PhaseInterceptorChain chain) { Endpoint e = ex.getEndpoint(); Client c = ex.get(Client.class); InterceptorProvider ip = ex.get(InterceptorProvider.class); chain.add(getBus().getInFaultInterceptors()); if (c != null) { chain.add(c.getInFaultInterceptors()); } else if (ip != null) { chain.add(ip.getInFaultInterceptors()); } chain.add(e.getService().getInFaultInterceptors()); chain.add(e.getInFaultInterceptors()); chain.add(e.getBinding().getInFaultInterceptors()); if (e.getService().getDataBinding() instanceof InterceptorProvider) { chain.add(((InterceptorProvider)e.getService().getDataBinding()).getInFaultInterceptors()); } addToChain(chain, ex.getInFaultMessage()); addToChain(chain, ex.getOutMessage()); } private void addToChain(PhaseInterceptorChain chain, Message m) {