Package org.jaxen

Examples of org.jaxen.FunctionCallException


    }

    public void testMessageIsNonNull() {
       
        JaxenException ex = new JaxenException("Hello");
        FunctionCallException rex = new FunctionCallException(ex);
        assertEquals(ex.getMessage(), rex.getMessage());
        assertEquals(ex, rex.getCause());
       
    }   
View Full Code Here


    }   
 
    public void testMessageIsSaved() {
       
        JaxenException ex = new JaxenException("Hello");
        FunctionCallException rex = new FunctionCallException("Goodbye", ex);
        assertEquals("Goodbye", rex.getMessage());
        assertEquals(ex, rex.getCause());
       
    }   
View Full Code Here

            URI xslUri;
            try {
                xslUri = new URI((String) args.get(0));
            } catch (URISyntaxException use) {
                // Shouldn't happen, checked at compilation time
                throw new FunctionCallException("First parameter of the bpws:doXslTransform isn't a valid URI!", use);
            }
            OXslSheet xslSheet = _oxpath.getXslSheet(xslUri);
            // Shouldn't happen, checked at compilation time
            if (xslSheet == null) throw new FunctionCallException("Couldn't find the XSL sheet " + args.get(0)
                    + ", process compilation or deployment was probably incomplete!");

            if (!(varElmt instanceof Element)) {
                throw new WrappedFaultException.JaxenFunctionException(
                        new FaultException(_oxpath.getOwner().constants.qnXsltInvalidSource,
View Full Code Here

            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);
                }
      }
        }
View Full Code Here

     */
    class BpelVariablePropertyFunction implements Function {
        public Object call(Context context, List args)
                throws FunctionCallException {
            if (args.size() != 2) {
                throw new FunctionCallException("missing required arguments");
            }

            OScope.Variable var = _oxpath.vars.get(args.get(0));
            OProcess.OProperty property = _oxpath.properties.get(args.get(1));

View Full Code Here

        {
            return evaluate( args.get(0),
                             context.getNavigator() );
        }

        throw new FunctionCallException( "string() takes at most argument." );
    }
View Full Code Here

     */
    public Object call(Context context,
                       List args) throws FunctionCallException
    {
        if (args.size() != 1) {
            throw new FunctionCallException("lang() requires exactly one argument.");  
        }
       
        Object arg = args.get(0);
           
        try {
            return evaluate(context.getNodeSet(), arg, context.getNavigator() );
        }
        catch(UnsupportedAxisException e) {
            throw new FunctionCallException("Can't evaluate lang()",
                                                 e);
        }
      
    }
View Full Code Here

        {
            return evaluate( args.get(0),
                             context.getNavigator() );
        }

        throw new FunctionCallException("ceiling() requires one argument.");
    }
View Full Code Here

            return evaluate( args.get(0),
                             args.get(1),
                             context.getNavigator() );
        }

        throw new FunctionCallException( "substring-before() requires two arguments." );
    }
View Full Code Here

        {
            return evaluate( args.get(0),
                             context.getNavigator() );
        }

        throw new FunctionCallException( "round() requires one argument." );
    }
View Full Code Here

TOP

Related Classes of org.jaxen.FunctionCallException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.