// What do we do if serviceName is null at this point???
if (serviceName == null)
serviceName = msgContext.getService().toString();
// look in incoming session
Session session = msgContext.getSession();
if (session != null) {
return getSessionServiceObject(session, serviceName,
msgContext, clsName);
} else {
// was no incoming session, sigh, treat as request scope
scopeHolder.value = Scope.DEFAULT.getValue();
return getNewServiceObject(msgContext, clsName);
}
} else if (scope == Scope.APPLICATION) {
// MUST be AxisEngine here!
AxisEngine engine = msgContext.getAxisEngine();
Session appSession = engine.getApplicationSession();
if (appSession != null) {
return getSessionServiceObject(appSession, serviceName,
msgContext, clsName);
} else {
// was no application session, sigh, treat as request scope