.cloneChain();
partialResponse.setInterceptorChain(newChian);
exchange.setDestination(target);
exchange.setOneWay(false);
exchange.put(ConduitSelector.class,
new PreexistingConduitSelector(backChannel, exchange.get(Endpoint.class)));
if (newChian != null && !newChian.doIntercept(partialResponse)
&& partialResponse.getContent(Exception.class) != null) {
if (partialResponse.getContent(Exception.class) instanceof Fault) {
throw (Fault)partialResponse.getContent(Exception.class);
} else {
throw new Fault(partialResponse.getContent(Exception.class));
}
}
return;
}
if (backChannel != null) {
partialResponse.put(Message.PARTIAL_RESPONSE_MESSAGE, Boolean.TRUE);
partialResponse.put(Message.EMPTY_PARTIAL_RESPONSE_MESSAGE, Boolean.TRUE);
boolean robust =
MessageUtils.isTrue(inMessage.getContextualProperty(Message.ROBUST_ONEWAY));
if (robust) {
BindingOperationInfo boi = exchange.get(BindingOperationInfo.class);
// insert the executor in the exchange to fool the OneWayProcessorInterceptor
exchange.put(Executor.class, getExecutor(inMessage));
// pause dispatch on current thread and resume...
inMessage.getInterceptorChain().pause();
inMessage.getInterceptorChain().resume();
MessageObserver faultObserver = inMessage.getInterceptorChain().getFaultObserver();
if (null != inMessage.getContent(Exception.class) && null != faultObserver) {
// return the fault over the response fault channel
inMessage.getExchange().setOneWay(false);
faultObserver.onMessage(inMessage);
return;
}
// restore the BOI for the partial response handling
exchange.put(BindingOperationInfo.class, boi);
}
// set up interceptor chains and send message
InterceptorChain chain =
fullResponse != null
? fullResponse.getInterceptorChain()
: OutgoingChainInterceptor.getOutInterceptorChain(exchange);
exchange.setOutMessage(partialResponse);
partialResponse.setInterceptorChain(chain);
exchange.put(ConduitSelector.class,
new PreexistingConduitSelector(backChannel,
exchange.get(Endpoint.class)));
if (chain != null && !chain.doIntercept(partialResponse)
&& partialResponse.getContent(Exception.class) != null) {
if (partialResponse.getContent(Exception.class) instanceof Fault) {