}
private Object evaluate(OExpression cexp, EvaluationContext ctx, QName type) throws FaultException, EvaluationException {
try {
OXPath20ExpressionBPEL20 oxpath20 = ((OXPath20ExpressionBPEL20) cexp);
XPathFactory xpf = new XPathFactoryImpl();
JaxpFunctionResolver funcResolver = new JaxpFunctionResolver(
ctx, oxpath20);
JaxpVariableResolver varResolver = new JaxpVariableResolver(ctx, oxpath20, ((XPathFactoryImpl) xpf).getConfiguration());
xpf.setXPathFunctionResolver(funcResolver);
xpf.setXPathVariableResolver(varResolver);
XPath xpe = xpf.newXPath();
xpe.setNamespaceContext(oxpath20.namespaceCtx);
String xpath = ((OXPath10Expression)cexp).xpath;
XPathExpression expr = xpe.compile(xpath);
Node contextNode = ctx.getRootNode() == null ? DOMUtils.newDocument() : ctx.getRootNode();
// Create step nodes in XPath in case it is incompletely instantiated