Package org.jboss.soa.esb.testutils

Examples of org.jboss.soa.esb.testutils.ESBConfigUtil


public class SOAPClient_Response_UnitTest extends TestCase {

    private ESBConfigUtil configUtil;

    public SOAPClient_Response_UnitTest() throws IOException, SAXException, ConfigurationException {
        configUtil = new ESBConfigUtil(getClass().getResourceAsStream("soapclient-config-01.xml"));
    }
View Full Code Here


        initaliseServices();
    }

    private void initaliseServices() throws ConfigurationException, RegistryException, ActionLifecycleException, IOException, SAXException {
        ESBConfigUtil esbConfig = new ESBConfigUtil(getClass().getResourceAsStream("action-configs-02.xml"));
        ConfigTree splitter1Config = esbConfig.getActionConfig("null-listener", "splitter1-action");
        ConfigTree splitter2Config = esbConfig.getActionConfig("null-listener", "splitter2-action");
        ConfigTree service1Config = esbConfig.getActionConfig("null-listener", "service1-config");
        ConfigTree service2Config = esbConfig.getActionConfig("null-listener", "service2-config");
        ConfigTree service3Config = esbConfig.getActionConfig("null-listener", "service3-config");
        ConfigTree aggregator1Config = esbConfig.getActionConfig("null-listener", "aggregator1-config");
        ConfigTree aggregator2Config = esbConfig.getActionConfig("null-listener", "aggregator2-config");
        ConfigTree aggregator3Config = esbConfig.getActionConfig("null-listener", "aggregator3-config");

        splitter1 = new StaticRouter(splitter1Config);
        splitter1.initialise();
        splitter2 = new StaticRouter(splitter2Config);
        splitter2.initialise();
View Full Code Here

   
    private ESBConfigUtil esbConfig;
    private byte[] personXmlBytes = StreamUtils.readStream(SourceResultUnitTest.class.getResourceAsStream("message/person.xml"));

    protected void setUp() throws Exception {
        esbConfig = new ESBConfigUtil(getClass().getResourceAsStream("source-result-esb.xml"));
        esbConfig.setESBProperties(getClass().getResourceAsStream("jbossesb-properties.xml"));
        esbConfig.installRegistry();
        esbConfig.startController();
    }
View Full Code Here

    private ESBConfigUtil esbConfig;
    private byte[] personXmlBytes = StreamUtils.readStream(SourceResultUnitTest.class.getResourceAsStream("message/person.xml"));

    protected void setUp() throws Exception {
        esbConfig = new ESBConfigUtil(getClass().getResourceAsStream("profiling-esb.xml"));
        esbConfig.setESBProperties(getClass().getResourceAsStream("jbossesb-properties.xml"));
        esbConfig.installRegistry();
        esbConfig.startController();
    }
View Full Code Here

public class ScheduledRedeliveryUnitTest{
    private static Object server;
   
    @Test
    public void test_listener_config() throws IOException, SAXException, ConfigurationException {
        ESBConfigUtil configUtil = new ESBConfigUtil(getClass().getResourceAsStream("config-01.xml"));
        String config = configUtil.getListenerConfig("simple-schedule-listener").toString();
        assertNotNull(config);
        try {
            ConfigTree tree = ConfigTree.fromXml(config);
            String maxDeliveries = tree.getFirstChild("action").getAttribute(MessageRedeliverer.MAX_REDELIVER_ATTR);
            assertEquals(maxDeliveries, "9");
View Full Code Here

            fail(e.getMessage());
        }
    }

    private void runTestConfig(String configName, long upTime) throws ParamRepositoryException, ConfigurationException, ManagedLifecycleException, SAXException, InterruptedException, IOException {
        ESBConfigUtil configUtil = new ESBConfigUtil(getClass().getResourceAsStream(configName));

        configUtil.startController();
        Thread.sleep(upTime);
        configUtil.stopController();
    }
View Full Code Here

        initaliseServices();
    }

    private void initaliseServices() throws ConfigurationException, RegistryException, ActionLifecycleException, IOException, SAXException {
        ESBConfigUtil esbConfig = new ESBConfigUtil(getClass().getResourceAsStream("action-configs-01.xml"));
        ConfigTree splitterConfig = esbConfig.getActionConfig("null-listener", "splitter1-action");
        ConfigTree service1Config = esbConfig.getActionConfig("null-listener", "service1-config");
        ConfigTree service2Config = esbConfig.getActionConfig("null-listener", "service2-config");
        ConfigTree aggregatorConfig = esbConfig.getActionConfig("null-listener", "aggregator-config");

        splitter = new StaticRouter(splitterConfig);
        splitter.initialise();
        service1 = new StaticRouter(service1Config);
        service1.initialise();
View Full Code Here

        initaliseServices();
    }

    private void initaliseServices() throws ConfigurationException, RegistryException, ActionLifecycleException, IOException, SAXException {
        ESBConfigUtil esbConfig = new ESBConfigUtil(getClass().getResourceAsStream("action-configs-01.xml"));
        ConfigTree splitterConfig = esbConfig.getActionConfig("null-listener", "splitter1-action");
        ConfigTree service1Config = esbConfig.getActionConfig("null-listener", "service1-config");
        ConfigTree service2Config = esbConfig.getActionConfig("null-listener", "service2-config");
        ConfigTree aggregatorConfig = esbConfig.getActionConfig("null-listener", "aggregator-config");

        splitter = new StaticRouter(splitterConfig);
        splitter.initialise();
        service1 = new StaticRouter(service1Config);
        service1.initialise();
View Full Code Here

        assertEquals("http://a", nsContext.getNamespaceURI("a"));
        assertEquals("http://b", nsContext.getNamespaceURI("b"));
    }

    private NamespaceContext test(String configName) throws MessageRouterException, IOException, SAXException, ConfigurationException {
        ESBConfigUtil esbConfig = new ESBConfigUtil(getClass().getResourceAsStream("config.xml"));
        ConfigTree configTree = esbConfig.getActionConfig("null-listener", configName);
        XPathRouter router = new XPathRouter();

        router.setConfigTree(configTree);

        Map<String, RoutingRule> map = router.getRoutingMap();
View Full Code Here

        test_routing(message, Arrays.asList(GREEN_MESSAGE));
    }

    public void test_routing(Message message, List objectLists) throws IOException, SAXException, ConfigurationException, MessageRouterException {
        ESBConfigUtil esbConfig = new ESBConfigUtil(getClass().getResourceAsStream("config.xml"));
        ConfigTree configTree = esbConfig.getActionConfig("null-listener", "5");
        XPathRouter router = new XPathRouter();

        router.setConfigTree(configTree);

        List<String> destinations = router.route(null, false, message, objectLists);
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.testutils.ESBConfigUtil

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.