OXPath10Expression.OSigGetVariableData sig = _oxpath.resolveGetVariableDataSig(varname,partname,xpathStr);
if (sig == null) {
String msg = "InternalError: Attempt to use an unknown getVariableData signature: " + args;
if (__log.isFatalEnabled())
__log.fatal(msg);
throw new FunctionCallException(msg);
}
try {
Node ret = _xpathEvalCtx.readVariable(sig.variable, sig.part);
if (sig.location != null)
ret = _xpathEvalCtx.evaluateQuery(ret, sig.location);
if (__log.isDebugEnabled()) {
__log.debug("bpws:getVariableData(" + args + ")' = " + ret);
}
return ret;
} catch (FaultException e) {
__log.error("bpws:getVariableData(" + args + ") threw FaultException", e);
throw new WrappedFaultException.JaxenFunctionException(e);
} catch (EvaluationException e) {
__log.error("bpws:getVariableData(" + args + ") threw EvaluationException", e);
if (e.getCause() instanceof FaultException) {
throw new WrappedFaultException.JaxenFunctionException((FaultException) e.getCause());
} else {
throw new FunctionCallException("SubLanguageException: Unable to evaluate query expression", e);
}
}
}