/** * Invokes EJB 3 endpoint. * * @param endpoint EJB 3 endpoint * @param wsInvocation web service invocation * @throws Exception if any error occurs */ public void invoke(final Endpoint endpoint, final Invocation wsInvocation) throws Exception { try { // prepare for invocation final ServiceEndpointContainer ejbContainer = this.getEjb3Container(); final InvocationContextCallback invocationCallback = new EJB3InvocationContextCallback(wsInvocation); final Class<?> implClass = ejbContainer.getServiceImplementationClass(); final Method seiMethod = wsInvocation.getJavaMethod(); final Method implMethod = this.getImplMethod(implClass, seiMethod); final Object[] args = wsInvocation.getArgs(); // invoke method final Object retObj = ejbContainer.invokeEndpoint(implMethod, args, invocationCallback); wsInvocation.setReturnValue(retObj); } catch (Throwable t) { this.log.error("Method invocation failed with exception: " + t.getMessage(), t); this.handleInvocationException(t); } }
/** * Invokes EJB 3 endpoint. * * @param endpoint EJB 3 endpoint * @param wsInvocation web service invocation * @throws Exception if any error occurs */ public void invoke(final Endpoint endpoint, final Invocation wsInvocation) throws Exception { try { // prepare for invocation final ServiceEndpointContainer ejbContainer = this.getEjb3Container(); final InvocationContextCallback invocationCallback = new EJB3InvocationContextCallback(wsInvocation); final Class<?> implClass = ejbContainer.getServiceImplementationClass(); final Method seiMethod = wsInvocation.getJavaMethod(); final Method implMethod = this.getImplMethod(implClass, seiMethod); final Object[] args = wsInvocation.getArgs(); // invoke method final Object retObj = ejbContainer.invokeEndpoint(implMethod, args, invocationCallback); wsInvocation.setReturnValue(retObj); } catch (Throwable t) { this.log.error("Method invocation failed with exception: " + t.getMessage(), t); this.handleInvocationException(t); } }
/** * Invokes EJB 3 endpoint. * * @param endpoint EJB 3 endpoint * @param wsInvocation web service invocation * @throws Exception if any error occurs */ public void invoke(final Endpoint endpoint, final Invocation wsInvocation) throws Exception { try { // prepare for invocation final ServiceEndpointContainer ejbContainer = this.getEjb3Container(); final InvocationContextCallback invocationCallback = new EJB3InvocationContextCallback(wsInvocation); final Class<?> implClass = ejbContainer.getServiceImplementationClass(); final Method seiMethod = wsInvocation.getJavaMethod(); final Method implMethod = this.getImplMethod(implClass, seiMethod); final Object[] args = wsInvocation.getArgs(); // invoke method final Object retObj = ejbContainer.invokeEndpoint(implMethod, args, invocationCallback); wsInvocation.setReturnValue(retObj); } catch (Throwable t) { this.log.error("Method invocation failed with exception: " + t.getMessage(), t); this.handleInvocationException(t); } }