Hi Andrew, The purpose of ContextUtils.rebaseResponse() is to cause a partial response to be sent from the server-side interceptor chain when an incoming message with a non-anonymous <wsa:ReplyTo> is encountered.
A partial response may have some <soap:headers> but always has an empty <soap:body/>. The purpose of sending this message is two-fold: (a) to unblock the client-side transport with a HTTP "202 Accepted" response (b) to optionally allow for certain headers to be passed back to the client *at the earliest possible opportunity *The motivation for (a) is to avoid tieing up a connection for the duration of time required to process the request, given that the full reponse is going to be sent on a separate server->client connection. The main motivation of (b) was the timely provision of WS-RM acknowledgements.Any pending ACKs may be encoded in the partial response to avoid establishing a new server->client connection just to deliver these ACKs. Waiting for the full response to be ready in order to send pending ACKs may not be feasible as the request may take an indeterminate amount of time to process. Now where is the exception on the outgoing partial response actually occurring? Is it in your own interceptor code? Do you need to actually do anything specific with the partial response? If not, how about just ignoring it and allowing it to complete without interference? You can check if a message is a partial response via the org.apache.cxf.message.MessageUtils.isPartialResponse() API. Cheers, Eoghan 2009/3/23 Andrew Harrison <[email protected]> > Hi, > > I'm trying to use the WSA features in CXF, but am having real problems. I'm > sending some ReplyTo and FaultTo headers in a request and I have some > interceptors to look at these and set properties etc. When I send a > request/response message with these headers in, MAPAggregator calls > ContextUtils.rebaseResponse which has some weird effects - the out chain on > the server side is called with a partial message. This usually ends in some > exception because the interceptors are not configured on out bound chain, or > because the WSA To in the outbound chain is not set up correctly yet. > > I have struggled for a long time trying to work out where in the chain to > put my interceptors which rely on being able to examine the contents of the > AddressingProperties. I now have IN and OUT interceptors in the PRE_LOGICAL > phase with the IN added before MAPAggregaor, and the OUT added after the > MAPAggregator. > > rebaseResponse kicks in on the IN chain at the server side if: > > (isOneway || !ContextUtils.isGenericAddress(maps.getReplyTo())) > > i.e., if the client has sent a ReplyTo to a request/response message > > as far as I can see. > > Can anyone explain what, why and how the ContextUtils.rebaseResponse is > supposed to do? > > cheers, > > Andrew > > > >
