On Wednesday 03 November 2010 11:29:54 am KARR, DAVID (ATTSI) wrote: > I have to write some interceptors that have to read from more than just > the outgoing or incoming message. Before the operation invocation, the > client code needs to put some data into a "context" that the interceptor > can read. This container needs to be thread-local. I've looked through > the doc, the examples, and the existing interceptors, and I don't see a > clue for how to do this.
This is easy. If you turn on the thread local request context (see the faq http://cxf.apache.org/faq.html) then you can put anything in the request context via: ((BindingProvider)proxy).getRequestContext().put("foo", myObject); and any interceptor can just query it via: message.get("foo"); -- Daniel Kulp [email protected] http://dankulp.com/blog
