Axis2 fails when init(ServiceContext) is not implemented in the skeleton
------------------------------------------------------------------------
Key: AXIS2-2051
URL: https://issues.apache.org/jira/browse/AXIS2-2051
Project: Axis 2.0 (Axis2)
Issue Type: Bug
Reporter: Thilina Gunarathne
Priority: Critical
Following method in the DependencyManager is the culprit... Class.getMethod
throws an methodNotFound exception when the init() method is not in the
skeleton..
public static void initServiceClass(Object obj,
ServiceContext serviceContext) {
try {
Class classToLoad = obj.getClass();
// We can not call classToLoad.getDeclaredMethed() , since there
// can be insatnce where mutiple services extends using one class
// just for init and other reflection methods
Method method = classToLoad.getMethod(SERVICE_INIT_METHOD, new
Class[]{ServiceContext.class});
if (method != null) {
method.invoke(obj, new Object[]{serviceContext});
}
} catch (SecurityException e) {
log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
} catch (IllegalArgumentException e) {
log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
} catch (IllegalAccessException e) {
log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
} catch (InvocationTargetException e) {
log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
} catch (NoSuchMethodException e) {
log.info("Exception trying to call " + SERVICE_INIT_METHOD, e);
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]