On Monday 25 October 2010 7:50:45 am Vidya Chandrasekaran wrote: > Hi, > > > A web application that I am developing uses CXF's dynamic client feature ( > http://cxf.apache.org/docs/dynamic-clients.html). I hold a single > reference to the client object (in the interest of memory consumption by > the generated stub classes) in my app. > > I initially used interceptors to add custom HTTP headers on the request. > The issue that I am facing now is that I need to send out different HTTP > header values (available in the HTTP session object) based on the user > submitting the request. > > With a single client object, I do not see a way of passing dynamic values > for the headers. is there any way around this?
If you turn ON the thread local request context (see faq: http://cxf.apache.org/faq.html) then you can stick values in the request context that would be specific for that request. The interceptors can query that value from the passed in Message and do things appropriately. -- Daniel Kulp [email protected] http://dankulp.com/blog
