Пример #1
0
  protected void invokeInboundChain(Exchange ex, Endpoint ep) {
    Message m = getInBoundMessage(ex);
    Message inMsg = ep.getBinding().createMessage();
    MessageImpl.copyContent(m, inMsg);

    // Copy Response Context to Client inBound Message
    // TODO a Context Filter Strategy required.
    inMsg.putAll(m);

    inMsg.put(Message.REQUESTOR_ROLE, Boolean.TRUE);
    inMsg.put(Message.INBOUND_MESSAGE, Boolean.TRUE);
    inMsg.setExchange(ex);

    Exception exc = inMsg.getContent(Exception.class);
    if (exc != null) {
      ex.setInFaultMessage(inMsg);
      ColocInFaultObserver observer = new ColocInFaultObserver(bus);
      observer.onMessage(inMsg);
    } else {
      // Handle Response
      ex.setInMessage(inMsg);
      PhaseManager pm = bus.getExtension(PhaseManager.class);
      SortedSet<Phase> phases = new TreeSet<Phase>(pm.getInPhases());
      ColocUtil.setPhases(phases, Phase.USER_LOGICAL, Phase.PRE_INVOKE);

      InterceptorChain chain = ColocUtil.getInInterceptorChain(ex, phases);
      inMsg.setInterceptorChain(chain);
      chain.doIntercept(inMsg);
    }
    ex.put(ClientImpl.FINISHED, Boolean.TRUE);
  }
Пример #2
0
 protected boolean isCompatibleOperationInfo(
     BindingOperationInfo sender, BindingOperationInfo receiver) {
   return ColocUtil.isCompatibleOperationInfo(
       sender.getOperationInfo(), receiver.getOperationInfo());
 }