Hi, Yes, both methods are thread safe. PhaseInterceptorChain.getCurrentMessage() as well as context.getMessageContext() will return the message associated with current request.
It depends on your use case what is more convenient - call that from the interceptor or get headers directly from service business logic. Regards, Andrei. > -----Original Message----- > From: adu [mailto:[email protected]] > Sent: Donnerstag, 7. November 2013 06:47 > To: [email protected] > Subject: RE: How to share data between soap header and web service > methods in apache cxf > > Thanks , Andrie. I tried that also and it works. > Are both the methods thread safe (PhaseInterceptorChain and > WebServiceContext)? > I will be getting a new header field value in every request, hence the value > passed in the header should be request scoped. > I guess, as the above 2 methods give me the current Message, each header > value that I get would be specific to a request. am I correct? > > > > -- > View this message in context: http://cxf.547215.n5.nabble.com/How-to- > share-data-between-soap-header-and-web-service-methods-in-apache- > cxf-tp5735950p5736063.html > Sent from the cxf-user mailing list archive at Nabble.com.
