public final void invoke ( final Endpoint endpoint , final Invocation invocation ) throws Exception { try { // prepare for invocation this . init ( endpoint , invocation ) ; final Object targetBean = invocation . getInvocationContext ( ) . getTargetBean ( ) ; final Class < ? > implClass = targetBean . getClass ( ) ; final Method seiMethod = invocation . getJavaMethod ( ) ; final Method implMethod = this . getImplMethod ( implClass , seiMethod ) ; final Object [ ] args = invocation . getArgs ( ) ; // notify subclasses this . onBeforeInvocation ( invocation ) ; // invoke implementation method final Object retObj = implMethod . invoke ( targetBean , args ) ; // set invocation result invocation . setReturnValue ( retObj ) ; } catch ( Exception e ) { Loggers . ROOT_LOGGER . methodInvocationFailed ( e ) ; // propagate exception this . handleInvocationException ( e ) ; } finally { // notify subclasses this . onAfterInvocation ( invocation ) ; } }
Invokes method on endpoint implementation .