public Duration evaluateAsDuration(OExpression cexp, EvaluationContext context) throws FaultException,
EvaluationException {
String literal = this.evaluateAsString(cexp, context);
try {
Duration duration = new org.apache.ode.utils.xsd.Duration(literal);
return duration;
} catch (Exception ex) {
String errmsg = "Invalid duration: " + literal;
__log.error(errmsg, ex);
throw new FaultException(cexp.getOwner().constants.qnInvalidExpressionValue, errmsg);