rkiesler wrote:
Freeman,
Thanks for this -- I am now able to add a property to the NormalizedMessage
in my cxf-bc interceptor.
On the cxf-se side, which phase should I use to get the NormalizedMessage? I
tried RECEIVE and PRE_INVOKE, but message.getContent(MessageExchange.class)
returns null in both phases.
RECEIVE is ok
use message.get(MessageExchange.class); but not
message.getContent(MessageExchange.class)
Example as below
public class ExtractPropertyInterceptor extends
AbstractPhaseInterceptor<Message> {
public ExtractPropertyInterceptor() {
super(Phase.RECEIVE);
}
public void handleMessage(Message message) {
MessageExchange exchange = message.get(MessageExchange.class);
NormalizedMessage norMessage =
(NormalizedMessage) exchange.getMessage("in");
//then you can get the properties you saved before from the
NorMessage
}
}
Thanks again,
--
Roy
Freeman Fang wrote:
Roy,
Change your phase to PRE_INVOKE, and use code like
MessageExchange exchange = message
.getContent(MessageExchange.class);
//use exchange here to get NormalizedMessage
Freeman
--
Freeman Fang
------------------------
Open Source SOA: http://fusesource.com