Package org.apache.ode.bpel.elang.xpath20.runtime

Examples of org.apache.ode.bpel.elang.xpath20.runtime.JaxpFunctionResolver$DayTimeDuration


        }
    }

    private Object evaluate(OExpression cexp, EvaluationContext ctx, QName type) throws FaultException, EvaluationException {
        try {
            OXPath20ExpressionBPEL20 oxpath20 = ((OXPath20ExpressionBPEL20) cexp);

            JaxpFunctionResolver funcResolver = new JaxpFunctionResolver(ctx, oxpath20);
            JaxpVariableResolver varResolver = new JaxpVariableResolver(ctx, oxpath20, ((XPathFactoryImpl) _xpf).getConfiguration());
            XPath xpe = _xpf.newXPath();
            xpe.setXPathFunctionResolver(funcResolver);
View Full Code Here


    /**
     * @see org.apache.ode.bpel.compiler.api.ExpressionCompiler#compile(java.lang.Object)
     */
    private OExpression _compile(org.apache.ode.bpel.compiler.bom.Expression xpath, boolean isJoinCondition)
            throws CompilationException {
        OXPath20ExpressionBPEL20 oexp = new OXPath20ExpressionBPEL20(_compilerContext.getOProcess(), _qnVarData,
                _qnVarProp, _qnLinkStatus, _qnXslTransform, isJoinCondition);
        oexp.namespaceCtx = _compilerContext.tryCacheNamespaceContext(xpath.getNamespaceContext());
        doJaxpCompile(oexp, xpath);
        return oexp;
    }
View Full Code Here

        compile("$foo");
    }

    @Test
    public void testVariableSelection() throws Exception {
        OXPath20ExpressionBPEL20 exp = compile("$foo");
        Node retVal = _runtime.evaluateNode(exp, this);
        assertNotNull(retVal);
        assertSame(retVal , _vars.get("foo"));
        assertSame(retVal.getOwnerDocument(),_vardoc);
    }
View Full Code Here

        assertSame(retVal.getOwnerDocument(),_vardoc);
    }

    @Test
    public void testVariableSelectionEmpty() throws Exception {
        OXPath20ExpressionBPEL20 exp = compile("$emptyVar");
        Node retVal = _runtime.evaluateNode(exp, this);
        assertNotNull(retVal);
        assertSame(retVal , _vars.get("emptyVar"));
        assertTrue(DOMUtils.getFirstChildElement((Element)retVal).getLocalName().equals("empty"));
    }
View Full Code Here

        assertTrue(DOMUtils.getFirstChildElement((Element)retVal).getLocalName().equals("empty"));
    }

    @Test
    public void testVariableSelectionReallyEmpty() throws Exception {
        OXPath20ExpressionBPEL20 exp = compile("$reallyEmptyVar");
        Node retVal = _runtime.evaluateNode(exp, this);
        assertNotNull(retVal);
        assertSame(retVal , _vars.get("reallyEmptyVar"));
        assertNull(DOMUtils.getFirstChildElement((Element)retVal));
    }
View Full Code Here

    @Test
    public void testXpathDocFunction() throws Exception {
        URL url = getClass().getResource("/xpath20/variables.xml");

        OXPath20ExpressionBPEL20 exp = compile("doc('" + url.toExternalForm() + "')");
        Node retVal = _runtime.evaluateNode(exp, this);
        assertNotNull(retVal);
        assertEquals("Unexpected root node", "variables", retVal.getNodeName());
    }
View Full Code Here

        assertEquals("Unexpected root node", "variables", retVal.getNodeName());
    }
   
    @Test
    public void testMessageTypeVariableSelection() throws Exception {
        OXPath20ExpressionBPEL20 exp = compile("$messageVar.parameters");
        Node retVal = _runtime.evaluateNode(exp, this);
        assertNotNull(retVal);
        assertSame(retVal , _vars.get("messageVar"));
        assertSame(retVal.getOwnerDocument(),_vardoc);
    }
View Full Code Here

    @Test
    public void testMessageInsertMissingData() throws Exception {
      String insertElementName="InsertedNode";
     
        OXPath20ExpressionBPEL20 exp = compile("$messageVar.parameters/"+insertElementName);
        exp.insertMissingData = true;
       
        // Setup root node
        _rootNode = DOMUtils.stringToDOM("<message><parameters>" +
            "<tns:ApplicationData xmlns:tns=\"http://foobar\"/></parameters></message>");
View Full Code Here

   
    @Test
    public void testVariableInsertMissingData() throws Exception {
      String insertElementName="InsertedNode";
     
        OXPath20ExpressionBPEL20 exp = compile("$reallyEmptyVar/"+insertElementName);
        exp.insertMissingData = true;
       
        // Setup root node
        _rootNode = DOMUtils.stringToDOM("<tns:ApplicationData xmlns:tns=\"http://foobar\"/>");
       
View Full Code Here

    /**
     * @see org.apache.ode.bpel.compiler.api.ExpressionCompiler#compile(java.lang.Object)
     */
    private OExpression _compile(org.apache.ode.bpel.compiler.bom.Expression xpath, boolean isJoinCondition)
            throws CompilationException {
        OXPath20ExpressionBPEL20 oexp = new OXPath20ExpressionBPEL20(_compilerContext.getOProcess(), _qnVarData,
                _qnVarProp, _qnLinkStatus, _qnXslTransform, isJoinCondition);
        oexp.namespaceCtx = xpath.getNamespaceContext();
        doJaxpCompile(oexp, xpath);
        return oexp;
    }
View Full Code Here

TOP

Related Classes of org.apache.ode.bpel.elang.xpath20.runtime.JaxpFunctionResolver$DayTimeDuration

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.