cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <>
Subject Re: Custom HandlerChainInvoker
Date Mon, 30 Sep 2013 17:27:24 GMT

On Sep 26, 2013, at 11:43 AM, Alessio Soldano <> wrote:

> Hi,
> I currently have an integration requirement which basically imply having to perform some
additional authorization checks just before invoking any JAXWS handler handleMessage method.
> For achieving that, I've thought about using a custom HandlerChainInvoker overriding
'invokeLogicalHandlers' and 'invokeProtocolHandlers' methods.
> For installing such a custom invoker, I thought about adding a custom AbstractPhaseInterceptor
running just before the SOAPHandlerInterceptor in the PRE_PROTOCOL_FRONTEND phase; the new
handler would install my invoker in the Exchange, similarly to what is done in AbstractJAXWSHandlerInterceptor#getInvoker.
> The problem I have, however, is that ofcourse I need a handle to the handler chain (List<Handler>)
to build the invoker: the handler chain is available from the Endpoint stored in the current
exchange, if the endpoint is an instance of JaxWsEndpointImpl. Any idea / hint on how to get
that there easily for other Endpoint types? 

Would there ever be these things for anything other than a JaxWsEndpointImpl?    Within the
CXF codebase, the only calls to the constructors of any of the subclasses of AbstractJAXWSHandlerInterceptor
are from JaxWsEndpointImpl.   Does the JBoss integration use something other than JaxWsEndpointImpl?
    The other subclasses of Endpoint are non JAX-WS (simple frontend or  jaxrs) and thus wouldn't
have handler chains anyway.

Mostly curious on that.

> Does the whole flow here make sense?
> Would it make sense to allow a more direct customization of the handler chain invoker?

I guess I'd want to know a little more about how the JBoss integration is dealing with the
JaxWsEndpointImpl.    I'm certainly very open to making the handler chain invocation more
customizable, but it's more a matter of "how".   

Daniel Kulp -
Talend Community Coder -

View raw message