if((result != null) && (result instanceof Throwable)) {
if(result instanceof IMTPException) {
throw (IMTPException)result;
}
else {
throw new IMTPException("An undeclared exception was thrown", (Throwable)result);
}
}
return ((Integer)result).intValue();
}
catch(ServiceException se) {
throw new IMTPException("Unable to access remote node", se);
}
}