/** * override the super class method */ public void onMessage(Message m) { if (m.get(Message.INBOUND_MESSAGE).equals(Boolean.TRUE)) { //it's outbound fault observer so only take care of outbound fault return; } Exception ex = m.getContent(Exception.class); ClientCallback callback = m.getExchange().get(ClientCallback.class); if (callback != null) { Map<String, Object> resCtx = CastUtils.cast((Map<?, ?>) m.getExchange().getOutMessage().get( Message.INVOCATION_CONTEXT)); resCtx = CastUtils.cast((Map<?, ?>) resCtx.get(Client.RESPONSE_CONTEXT)); callback.handleException(resCtx, ex); } }
/** * override the super class method */ public void onMessage(Message m) { if (m.get(Message.INBOUND_MESSAGE).equals(Boolean.TRUE)) { //it's outbound fault observer so only take care of outbound fault return; } Exception ex = m.getContent(Exception.class); // remove callback so that it won't be invoked twice ClientCallback callback = m.getExchange().remove(ClientCallback.class); if (callback != null) { Map<String, Object> resCtx = CastUtils.cast((Map<?, ?>) m.getExchange().getOutMessage().get( Message.INVOCATION_CONTEXT)); resCtx = CastUtils.cast((Map<?, ?>) resCtx.get(Client.RESPONSE_CONTEXT)); callback.handleException(resCtx, ex); } }
/** * override the super class method */ public void onMessage(Message m) { if (m.get(Message.INBOUND_MESSAGE).equals(Boolean.TRUE)) { //it's outbound fault observer so only take care of outbound fault return; } Exception ex = m.getContent(Exception.class); ClientCallback callback = m.getExchange().get(ClientCallback.class); if (callback != null) { Map<String, Object> resCtx = CastUtils.cast((Map<?, ?>) m.getExchange().getOutMessage().get( Message.INVOCATION_CONTEXT)); resCtx = CastUtils.cast((Map<?, ?>) resCtx.get(Client.RESPONSE_CONTEXT)); callback.handleException(resCtx, ex); } }
/** * override the super class method */ public void onMessage(Message m) { if (m.get(Message.INBOUND_MESSAGE).equals(Boolean.TRUE)) { //it's outbound fault observer so only take care of outbound fault return; } Exception ex = m.getContent(Exception.class); // remove callback so that it won't be invoked twice ClientCallback callback = m.getExchange().remove(ClientCallback.class); if (callback != null) { Map<String, Object> resCtx = CastUtils.cast((Map<?, ?>) m.getExchange().getOutMessage().get( Message.INVOCATION_CONTEXT)); resCtx = CastUtils.cast((Map<?, ?>) resCtx.get(Client.RESPONSE_CONTEXT)); callback.handleException(resCtx, ex); } }
public void handleException(Map<String, Object> ctx, Throwable ex) { try { super.handleException(ctx, ex);
responseContext.put(Thread.currentThread(), resCtx); callback.handleException(resCtx, error); callback.handleException(resCtx, ex);
responseContext.put(Thread.currentThread(), resCtx); callback.handleException(resCtx, error); callback.handleException(resCtx, ex);
callback.handleException(resCtx, error); callback.handleException(resCtx, ex);
callback.handleException(resCtx, error); callback.handleException(resCtx, ex);