Hi

I'm looking at the following issue.
A oneway request with a decoupled WSA FaultTo address is processed on the
server side and then a fault is thrown.
MapCodec and MapAggregator interceptors are not handling this case at the
moment.

Eoghan clarified how ContextUtils.rebaseAddress used by MapAggregator works.
Particularly, a partial response is sent back asap, and then
an out message is prepared such that a normal response is sent to the
decoupled ReplyTo (during this process an out interceptor chain is created).

The question is how to forward a fault to the decoupled address in case of
oneway requests and particularly, how to build a proper chain.
I'm prototyping the following code in MapCodec.handleFault() :

// MapCodec::handleFault(Message message)
            if (oneWay and !isRequestor())
            {
               Exchange exchange = message.getExchange();

               // we need the input message so that we can get the WSA
properties from it

               Message inMessage = exchange.getInMessage();
               AddressingPropertiesImpl maps =
                   ContextUtils.retrieveMAPs(inMessage, false, false, true);
               if (maps != null &&
!ContextUtils.isGenericAddress(maps.getFaultTo())) {

                // boilerplate code for getting a backChannel, using
inMessage
                Destination target = inMessage.getDestination();
                exchange.setOutMessage(message);

                Conduit backChannel = target.getBackChannel(inMessage,
                                                                message,

maps.getFaultTo());

                // Set up the chain
                InterceptorChain chain =
OutgoingChainInterceptor.getOutInterceptorChain(exchange);
                message.setInterceptorChain(chain);

                exchange.put(ConduitSelector.class,
                                     new
PreexistingConduitSelector(backChannel,

exchange.get(Endpoint.class)));

                chain.doIntercept(message)
           }


The question is basically how to set up an out chain properly to deal with
delivering a fault message in case of oneway requests.

Some clarifications would help
thanks, Sergey

Reply via email to