cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jesper Isaksen <>
Subject Accessing the SEI class from within an interceptor
Date Fri, 18 Nov 2016 07:11:46 GMT

When developing a server side CXF interceptor, I need to access the
Implementor class of a JAX-WS service to retrieve configuration values. Is
it possible to access the implementor class from within a custom
interceptor without using reflection?

My current solution is can be seen in the code below but I would prefer a
cleaner solution if possible:

Endpoint endpoint = message.getExchange().getEndpoint();
if(endpoint instanceof JaxWsEndpointImpl) {
JaxWsEndpointImpl endpointImpl = (JaxWsEndpointImpl) endpoint;<
JaxWsImplementorInfo implInfo;
try {
Field implementorInfo =
implInfo = (JaxWsImplementorInfo) implementorInfo.get(endpointImpl);
Class<?> implementorClass = implInfo.getImplementorClass();
} catch (IllegalAccessException | NoSuchFieldException e) {

I am using CXF 2.6.8. And thanks for a great framework!

Best regards

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message