Hi Yann,

Basically you can retrieve set of interceptors either from current message 
using message.getInterceptorChain().iterator() or from endpoint using 
endpoint.getInterceptors(), endpoint.getOutInterceptors(), 
endpoint.getInFaultInterceptors(), endpoint.getOutFaultInterceptors().

But why you cannot configure your necessary client interceptors in the same way 
as for your endpoint: using features, polices or just single interceptors? You 
can do it via spring/blueprint configuration or programmatically.

Regards,
Andrei.

-----Original Message-----
From: yann777 [mailto:[email protected]] 
Sent: 30 May 2012 16:43
To: [email protected]
Subject: Retrieving interceptor list from an endpoint instance

Hello,

I have a web server that runs on CXF 2.3.1, that is created using a 
CXFNonSpringJaxrsServlet web.xml configuration file. This endpoint has 
interceptors and handlers attached to it. Into this REST service, when I call a 
specific method (let's say getOtherServer()), this method programmatically 
creates a CXF non-spring WebClient to act as a client towards another server. 
What I would like to do is to have getOtherServer() to create a client that has 
the same set of interceptors than my endpoint.

Is it possible from inside the endpoint to get the interceptors attached to 
this enpoint instance ?
Or do you see any other means by which I could create the Webclient with the 
same set of interceptors than the endpoint ?

Cheers,

Yann

--
View this message in context: 
http://cxf.547215.n5.nabble.com/Retrieving-interceptor-list-from-an-endpoint-instance-tp5708840.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to