final String sessionId = null;
conn.setup(host, path, sessionId, params);
try {
// Lookup server scope when connected
// Use host and application name
IGlobalScope global = server.lookupGlobal(host, path);
if (global == null) {
call.setStatus(Call.STATUS_SERVICE_NOT_FOUND);
if (call instanceof IPendingServiceCall) {
StatusObject status = getStatus(NC_CONNECT_INVALID_APPLICATION);
status.setDescription("No scope \"" + path
+ "\" on this server.");
((IPendingServiceCall) call).setResult(status);
}
log.info("No application scope found for {} on host {}. Misspelled or missing application folder?", path, host);
disconnectOnReturn = true;
} else {
final IContext context = global.getContext();
IScope scope = null;
try {
scope = context.resolveScope(global, path);
} catch (ScopeNotFoundException err) {
call.setStatus(Call.STATUS_SERVICE_NOT_FOUND);