Package org.apache.synapse.axis2

Examples of org.apache.synapse.axis2.EmptyMessageReceiver


                    "</synapse>";

    public void setUp() throws Exception {
        msgCtx = Axis2EnvSetup.axis2Deployment("target/synapse-repository");
        config = Axis2EnvSetup.getSynapseConfigElement(synapsexml);
        env = new Axis2SynapseEnvironment(config,
                Thread.currentThread().getContextClassLoader());
    }
View Full Code Here


    public void setUp() throws Exception {
        msgCtx = Axis2EnvSetup.axis2Deployment("target/synapse-repository");
    }

    public void testAddressingProcessor() throws Exception {
        SynapseEnvironment env = new Axis2SynapseEnvironment(
                Axis2EnvSetup.getSynapseConfigElement(synapsexml),
                Thread.currentThread().getContextClassLoader());
        SynapseMessage smc = new Axis2SynapseMessage(msgCtx);
        env.injectMessage(smc);
        assertTrue(((Boolean) smc.getProperty(
                Constants.MEDIATOR_RESPONSE_PROPERTY)).booleanValue());
        assertEquals("add",env.lookupProcessor("add").getName());
    }
View Full Code Here

        Object processorObject = clazz.newInstance();
        if (!(processorObject instanceof XSLTProcessorConfigurator)) {
            throw new Exception(
                    "XSLTProcessorConfigurator initialization falied");
        }
        SynapseEnvironment env = new Axis2SynapseEnvironment(
                Axis2EnvSetup.getSynapseConfigElement(synapsexml),
                Thread.currentThread().getContextClassLoader());
        assertNotNull(env.getMasterProcessor());

        SynapseMessage sm = new Axis2SynapseMessage(
                Axis2EnvSetup.axis2Deployment("target/synapse-repository"));
        // throws exceptions if anything goes wrong
        env.injectMessage(sm);

    }
View Full Code Here

                    "</synapse>";

    public void setUp() throws Exception {
        msgCtx = Axis2EnvSetup.axis2Deployment("target/synapse-repository-sendonAxis2");
        config =Axis2EnvSetup.getSynapseConfigElement(synapsexml);
        env = new Axis2SynapseEnvironment(config,
                Thread.currentThread().getContextClassLoader());
    }
View Full Code Here

                Thread.currentThread().getContextClassLoader());
    }

    public void testAddressingProcessor() throws Exception {

        SynapseMessage smc = new Axis2SynapseMessage(msgCtx);
        env.injectMessage(smc);
        assertTrue(((Boolean) smc.getProperty(
                Constants.MEDIATOR_RESPONSE_PROPERTY)).booleanValue());
    }
View Full Code Here

*/

public class AddressingProcessorTest extends TestCase {

    public void testAddressingProcessor() throws Exception {
        SynapseMessage sm = new Axis2SynapseMessage(
                Axis2EnvSetup.axis2Deployment("target/synapse-repository"));
        Processor addressingProcessor = new AddressingInProcessor();
        SynapseEnvironment env = new Axis2SynapseEnvironment(null,null);
        boolean result = addressingProcessor.process(env,sm);
        assertTrue(((Boolean) sm.getProperty(
                Constants.MEDIATOR_RESPONSE_PROPERTY)).booleanValue());
        assertTrue(result);
    }
View Full Code Here

        env = new Axis2SynapseEnvironment(config,
                Thread.currentThread().getContextClassLoader());
    }

    public void testRegexProcessor() throws Exception {
        SynapseMessage smc = new Axis2SynapseMessage(mc);
        env.injectMessage(smc);
        assertEquals("regex", env.lookupProcessor("regex").getName());

    }
View Full Code Here

*
*/

public class RegexProcessorTest extends TestCase {
    public void testRegexProcessor() throws Exception {
        SynapseMessage sm = new Axis2SynapseMessage(Axis2EnvSetup.axis2Deployment("target/synapse-repository"));
        sm.setTo(new EndpointReference("http://xmethods.org"));
        RegexProcessor pro = new RegexProcessor();
        pro.setPattern("http://xmethods..\\*");
        boolean result = pro.process(null,sm);
        assertTrue(result);

View Full Code Here

*
*/

public class ServiceMediatorProcessorTest extends TestCase {
    public void testServiceMediatorProcessor() throws Exception {
        SynapseMessage sm = new Axis2SynapseMessage(
                Axis2EnvSetup.axis2Deployment("target/synapse-repository-sendonAxis2"));
        ServiceMediatorProcessor pro = new ServiceMediatorProcessor();
        pro.setServiceName("test-mediator");
        boolean result = pro.process(null,sm);
        assertTrue(result);
View Full Code Here

*
*/

public class XpathProcessorTest extends TestCase {
    public void testXpathProcessor() throws Exception {
        SynapseMessage sm = new Axis2SynapseMessage(
                Axis2EnvSetup.axis2Deployment("target/synapse-repository"));
        XPathProcessor pro = new XPathProcessor();
        pro.setXPathExpr("//ns:text");
        pro.addXPathNamespace("ns", "urn:text-body");
        boolean result = pro.process(null, sm);
View Full Code Here

TOP

Related Classes of org.apache.synapse.axis2.EmptyMessageReceiver

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.