Sorry, that won't work with JAX-WS.
May be, instead of using @InInterceptors, register the interceptor on
the endpoint the same way you do it with the service class.
Sergey
On 17/11/17 10:34, Sergey Beryozkin wrote:
Hi
Try to add
org.apache.cxf.annotations.Provider annotation:
@Provider(Type.InInterceptor)
to InfoInterceptor instead of @InInterceptors...
Sergey
On 17/11/17 09:28, Balu S wrote:
Hi,
I have tried to inject CDI Bean (using @Inject) in the CXF interceptor
but
it is not instantiated and is null.
However If I use the CDI injection in the Webservice implementation
class,
then it is instantiated correctly.
*Interceptor*
public class InfoInterceptor extends AbstractPhaseInterceptor<Message> {
public InfoInterceptor() {
super(Phase.RECEIVE);
}
@Inject InfoBean info; // not instantiated and null!!
....
}
*Webservice* (declared interceptor in webservice).
@org.apache.cxf.interceptor.InInterceptors(interceptors =
{"org.test.sample.InfoInterceptor"})
@WebService(....)
public class InfoImpl { ...
@Inject InfoBean info; // works here
...
}
Does CXF interceptors not support CDI injection currently ?
Appreciate your response on this. Thanks
regards
Balu