Examples of OMElementConvertor


Examples of org.apache.axis2.scripting.convertors.OMElementConvertor

            log.debug("invoking script service");

            outMC.setEnvelope(getSOAPFactory(inMC).getDefaultEnvelope());

            BSFEngine engine = getBSFEngine(inMC);
            OMElementConvertor convertor = (OMElementConvertor) inMC.getServiceContext().getProperty(CONVERTOR_PROP);

            Parameter scriptFunctionParam = inMC.getAxisService().getParameter(FUNCTION_ATTR);
            String scriptFunction = scriptFunctionParam == null ? DEFAULT_FUNCTION : (String) scriptFunctionParam.getValue();

            ScriptMessageContext inScriptMC = new ScriptMessageContext(inMC, convertor);
View Full Code Here

Examples of org.apache.axis2.scripting.convertors.OMElementConvertor

            bsfEngine.exec(scriptName, 0, 0, scriptSrc);

            ServiceContext serviceContext = mc.getServiceContext();
            serviceContext.setProperty(BSFENGINE_PROP, bsfEngine);

            OMElementConvertor convertor = ConvertorFactory.createOMElementConvertor(axisService, scriptName);
            serviceContext.setProperty(CONVERTOR_PROP, convertor);

            return bsfEngine;

        } catch (BSFException e) {
View Full Code Here

Examples of org.apache.axis2.scripting.convertors.OMElementConvertor

            log.debug("invoking script service");

            outMC.setEnvelope(getSOAPFactory(inMC).getDefaultEnvelope());

            BSFEngine engine = getBSFEngine(inMC);
            OMElementConvertor convertor = (OMElementConvertor) inMC.getServiceContext().getProperty(CONVERTOR_PROP);

            Parameter scriptFunctionParam = inMC.getAxisService().getParameter(FUNCTION_ATTR);
            String scriptFunction = scriptFunctionParam == null ? DEFAULT_FUNCTION : (String) scriptFunctionParam.getValue();

            ScriptMessageContext inScriptMC = new ScriptMessageContext(inMC, convertor);
View Full Code Here

Examples of org.apache.axis2.scripting.convertors.OMElementConvertor

            bsfEngine.exec(scriptName, 0, 0, scriptSrc);

            ServiceContext serviceContext = mc.getServiceContext();
            serviceContext.setProperty(BSFENGINE_PROP, bsfEngine);

            OMElementConvertor convertor = ConvertorFactory.createOMElementConvertor(axisService, scriptName);
            serviceContext.setProperty(CONVERTOR_PROP, convertor);

            return bsfEngine;

        } catch (BSFException e) {
View Full Code Here

Examples of org.apache.axis2.scripting.convertors.OMElementConvertor

            log.debug("invoking script service");

            outMC.setEnvelope(getSOAPFactory(inMC).getDefaultEnvelope());

            BSFEngine engine = getBSFEngine(inMC);
            OMElementConvertor convertor = (OMElementConvertor) inMC.getServiceContext().getProperty(CONVERTOR_PROP);

            Parameter scriptFunctionParam = inMC.getAxisService().getParameter(FUNCTION_ATTR);
            String scriptFunction = scriptFunctionParam == null ? DEFAULT_FUNCTION : (String) scriptFunctionParam.getValue();

            ScriptMessageContext inScriptMC = new ScriptMessageContext(inMC, convertor);
View Full Code Here

Examples of org.apache.axis2.scripting.convertors.OMElementConvertor

            bsfEngine.exec(scriptName, 0, 0, scriptSrc);

            ServiceContext serviceContext = mc.getServiceContext();
            serviceContext.setProperty(BSFENGINE_PROP, bsfEngine);

            OMElementConvertor convertor = ConvertorFactory.createOMElementConvertor(axisService, scriptName);
            serviceContext.setProperty(CONVERTOR_PROP, convertor);

            return bsfEngine;

        } catch (BSFException e) {
View Full Code Here

Examples of org.apache.synapse.mediators.bsf.convertors.OMElementConvertor

            throw new SynapseException(e.getTargetException());
        }
    }

    protected OMElementConvertor createOMElementConvertor(String scriptName) {
        OMElementConvertor oc = null;
        int lastDot = scriptName.lastIndexOf('.');
        if (lastDot > -1) {
            String suffix = scriptName.substring(lastDot + 1).toUpperCase();
            String className = OMElementConvertor.class.getName();
            int i = className.lastIndexOf('.');
View Full Code Here

Examples of org.apache.synapse.mediators.bsf.convertors.OMElementConvertor

        assertTrue(mediator.mediate(mc));
    }
   
    public void testJSCreateOMElementConvertor() {
        ScriptMediator mediator = new ScriptMediator(null, null);
        OMElementConvertor convertor = mediator.createOMElementConvertor("foo.js");
        assertTrue(convertor instanceof JSOMElementConvertor);
    }
View Full Code Here

Examples of org.apache.synapse.mediators.bsf.convertors.OMElementConvertor

        assertTrue(convertor instanceof JSOMElementConvertor);
    }

    public void testRBCreateOMElementConvertor() {
        ScriptMediator mediator = new ScriptMediator(null, null);
        OMElementConvertor convertor = mediator.createOMElementConvertor("foo.rb");
        assertTrue(convertor instanceof RBOMElementConvertor);
    }
View Full Code Here

Examples of org.apache.synapse.mediators.bsf.convertors.OMElementConvertor

        assertTrue(convertor instanceof RBOMElementConvertor);
    }
   
    public void testDefaultCreateOMElementConvertor() {
        ScriptMediator mediator = new ScriptMediator(null, null);
        OMElementConvertor convertor = mediator.createOMElementConvertor("foo.bla");
        assertTrue(convertor instanceof DefaultOMElementConvertor);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.