On Sunday, March 18, 2012 04:58:00 PM Alex O'Ree wrote: > I'm writing a pair of POST_LOGICAL interceptors and need to be able to > pass some variables that are discovered on the request flow, to the > response flow. > > In other frameworks, I've been able to just add what I need into the > message request context (org.apache.cxf.message.Message) and it > magically appears when the response handler chain fires off. This > doesn't appear to be the case for cxf. Can only confirm this behavior?
Yes. The "Message" object just represents the information and context around that particular message. However, the message does hold onto an Exchange object which represents the entire exchange, including the incoming and outgoing messages. In your case, call message.getExchange().put(...) and you could retrieve it the same way. Dan > Better yet, does anyone know of a work around or an alternate > mechanism? I'm thinking that perhaps I'm using the wrong phase to do > such a task. > > Ironically, if I used a jaxws handler, the values added in the request > context are available in the response context. -- Daniel Kulp [email protected] - http://dankulp.com/blog Talend Community Coder - http://coders.talend.com
