//execute the function call
fnRef.analyze(new AnalyzeContextInfo());
final org.exist.xquery.value.Sequence result = fnRef.evalFunction(null, null, fnArgs);
return new SequenceAdapter(result);
} catch(final URISyntaxException use) {
throw new RestXqServiceException(use.getMessage(), use);
} catch(final PermissionDeniedException pde) {
throw new RestXqServiceException(pde.getMessage(), pde);
} catch(final XPathException xpe) {