Class[] parameterTypes,
Object[] args)
throws Exception {
/* take the service context */
ServiceContextImpl serviceContext = (ServiceContextImpl)args[0];
try {
/* authenticate the request */
authenticate((ServiceContextImpl)args[0], className, methodName);
/* invoke the method */
Class serviceClass = Class.forName(className);
Method method = serviceClass.getMethod(methodName, parameterTypes);
Object serviceObject = ServiceFactory.getService(serviceClass);
/* invoke the method */
return method.invoke(serviceObject, args);
} finally {
serviceContext.releaseResources();
}
}