in axis-rt-core/src/main/java/org/apache/axis/description/JavaServiceDesc.java [1016:1120]
private void getSyncedOperationsForName(Class implClass, String methodName)
{
// If we're a Skeleton deployment, skip the statics.
if (isSkeletonClass) {
if (methodName.equals("getOperationDescByName") ||
methodName.equals("getOperationDescs"))
return;
}
// If we have no implementation class, don't worry about it (we're
// probably on the client)
if (implClass == null)
return;
// If we're done introspecting, or have completed this method, return
if (completedNames == null || completedNames.contains(methodName))
return;
// Skip it if it's not a sanctioned method name
if ((allowedMethods != null) &&
!allowedMethods.contains(methodName))
return;
if ((disallowedMethods != null) &&
disallowedMethods.contains(methodName))
return;
// If we're a skeleton class, make sure we don't already have any
// OperationDescs for this name (as that might cause conflicts),
// then load them up from the Skeleton class.
if (isSkeletonClass && !haveAllSkeletonMethods) {
// FIXME : Check for existing ones and fault if found
if (skelMethod == null) {
// Grab metadata from the Skeleton for parameter info
try {
skelMethod = implClass.getDeclaredMethod(
"getOperationDescByName",
new Class [] { String.class });
} catch (NoSuchMethodException e) {
} catch (SecurityException e) {
}
if (skelMethod == null) {
// FIXME : Throw an error?
return;
}
}
try {
List skelList =
(List)skelMethod.invoke(implClass,
new Object [] { methodName });
if (skelList != null) {
Iterator i = skelList.iterator();
while (i.hasNext()) {
addOperationDesc((OperationDesc)i.next());
}
}
} catch (IllegalAccessException e) {
if(log.isDebugEnabled()) {
log.debug(Messages.getMessage("exception00"), e);
}
return;
} catch (IllegalArgumentException e) {
if(log.isDebugEnabled()) {
log.debug(Messages.getMessage("exception00"), e);
}
return;
} catch (InvocationTargetException e) {
if(log.isDebugEnabled()) {
log.debug(Messages.getMessage("exception00"), e);
}
return;
}
}
// OK, go find any current OperationDescs for this method name and
// make sure they're synced with the actual class.
if (name2OperationsMap != null) {
ArrayList currentOverloads =
(ArrayList)name2OperationsMap.get(methodName);
if (currentOverloads != null) {
// For each one, sync it to the implementation class' methods
for (Iterator i = currentOverloads.iterator(); i.hasNext();) {
OperationDesc oper = (OperationDesc) i.next();
if (oper.getMethod() == null) {
syncOperationToClass(oper, implClass);
}
}
}
}
// Now all OperationDescs from deployment data have been completely
// filled in. So we now make new OperationDescs for any method
// overloads which were not covered above.
// NOTE : This is the "lenient" approach, which allows you to
// specify one overload and still get the others by introspection.
// We could equally well return above if we found OperationDescs,
// and have a rule that if you specify any overloads, you must specify
// all the ones you want accessible.
createOperationsForName(implClass, methodName);
// Note that we never have to look at this method name again.
completedNames.add(methodName);
}