cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Liu, Jervis" <j...@iona.com>
Subject RE: JaxwsInterceptorRemoverInterceptor and RM
Date Tue, 12 Dec 2006 15:44:01 GMT
I am using similar code in SAAJ case, where I need to stop the process of inbound interceptors,
create a new chain for outbound, start the outbound interceptor chain from a certain point,
see code snippet below from LogicalHandlerInterceptor.java

                message.getInterceptorChain().abort();
                Message responseMsg = new MessageImpl();
                message.getExchange().setInMessage(responseMsg);
 
                Client client = (Client)message.getExchange().get(Client.class);
                responseMsg.put(PhaseInterceptorChain.STARTING_AFTER_INTERCEPTOR_ID, this.getId());

This definitely works, but in the rm case, can we just modify the interceptor chain dynamically,
say, adding or removing some interceptors, without creating a new chain?

Cheers,
Jervis

> -----Original Message-----
> From: Dan Diephouse [mailto:dan@envoisolutions.com]
> Sent: Tuesday, December 12, 2006 5:34 AM
> To: cxf-dev@incubator.apache.org
> Subject: JaxwsInterceptorRemoverInterceptor and RM
> 
> 
> I added a HolderOutInterceptor which handles the holder stuff 
> for outgoing
> invocations. But I noticed that this still gets executed in 
> RM scenarios,
> causing issues as what it expects to be there is not there.
> 
> Would it help if RM could do something like this: once it 
> realizes there is
> an RM message, stop the current chain and start a new chain 
> at a specified
> phase. The idea here being that the new chain has only the 
> interceptors RM
> needs.  In code form:
> 
> currentChain.stop();
> newChain.doIntercept(message, startPhase);
> 
> This scenario would be needed for the SAAJ case too where we 
> have a reversed
> chain, with a pre-made SAAJ response and need to start it 
> somewhere after
> the first phase.
> 
> Cheers,
> - Dan
> 
> -- 
> Dan Diephouse
> Envoi Solutions
> http://envoisolutions.com | http://netzooid.com/blog
> 

Mime
View raw message