public void invoke(final Endpoint endpoint, final Invocation wsInvocation) throws Exception {
try {
// prepare for invocation
onBeforeInvocation(wsInvocation);
// prepare invocation data
final ComponentViewInstance componentViewInstance = getComponentViewInstance();
final Method method = getEJBMethod(wsInvocation.getJavaMethod(), componentViewInstance.allowedMethods());
final InterceptorContext context = new InterceptorContext();
context.setMethod(method);
context.setContextData(getWebServiceContext(wsInvocation).getMessageContext());
context.setParameters(wsInvocation.getArgs());
context.setTarget(componentViewInstance.createProxy());
context.putPrivateData(Component.class, componentViewInstance.getComponent());
context.putPrivateData(ComponentViewInstance.class, componentViewInstance);
// invoke method
final Object retObj = componentViewInstance.getEntryPoint(method).processInvocation(context);
// set return value
wsInvocation.setReturnValue(retObj);
}
catch (Throwable t) {
log.error("Method invocation failed with exception: " + t.getMessage(), t);