Package org.apache.servicemix.client

Examples of org.apache.servicemix.client.ServiceMixClient.done()


                populateExchange(exchange);
                client.sendSync(exchange);
                assertNotNull(exchange.getMessage("out"));
                //assertNotNull(exchange.getMessage("out").getContent());
                // TODO: check out
                client.done(exchange);

                // Stop and undeploy
                component.getServiceUnitManager().stop(suName);
                component.getServiceUnitManager().shutDown(suName);
                component.getServiceUnitManager().undeploy(suName,
View Full Code Here


        me.setOperation(new QName("receive"));
        NormalizedMessage nm = me.getInMessage();
        nm.setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(me);
        assertExchangeWorked(me);
        client.done(me);
    }

    protected void assertExchangeWorked(MessageExchange me) throws Exception {
        if (me.getStatus() == ExchangeStatus.ERROR) {
            if (me.getError() != null) {
View Full Code Here

        me.setOperation(new QName("receive"));
        NormalizedMessage nm = me.getInMessage();
        nm.setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(me);
        assertExchangeWorked(me);
        client.done(me);
    }
   
    protected void assertExchangeWorked(MessageExchange me) throws Exception {
        if (me.getStatus() == ExchangeStatus.ERROR) {
            if (me.getError() != null) {
View Full Code Here

        }
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        String out = new SourceTransformer().contentToString(me.getMessage("out"));
        log.info(out);
        log.info("Time: " + (t1 - t0));
        client.done(me);
    }

    protected AbstractXmlApplicationContext createBeanFactory() {
        return new ClassPathXmlApplicationContext("org/apache/servicemix/bpe/spring.xml");
    }
View Full Code Here

        InOut me = dest.createInOutExchange();
        me.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(me);
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        String str = new SourceTransformer().contentToString(me.getOutMessage());
        client.done(me);
        logger.info(str);
    }

    public void testSoapRoundtripProviderConsumerProvider() throws Exception {
        EchoComponent echo = new EchoComponent();
View Full Code Here

        InOut me = dest.createInOutExchange();
        me.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(me);
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        String str = new SourceTransformer().contentToString(me.getOutMessage());
        client.done(me);
        System.err.println(str);
    }

    public void testSoapRoundtripProviderConsumerProvider() throws Exception {
        EchoComponent echo = new EchoComponent();
View Full Code Here

                populateExchange(exchange);
                client.sendSync(exchange);
                checkResult(exchange);
                //assertNotNull(exchange.getMessage("out").getContent());
                // TODO: check out the exchange
                client.done(exchange);

                // Stop and undeploy
                component.getServiceUnitManager().stop(suName);
                component.getServiceUnitManager().shutDown(suName);
                component.getServiceUnitManager().undeploy(suName,
View Full Code Here

            in.setContent(new StringSource("<ping>Pinging you</ping>"));
            LOGGER.info("SENDING; exchange.status={}", exchange.getStatus());
            client.sendSync(exchange);
            assertNotNull(exchange.getOutMessage());
            LOGGER.info("GOT RESPONSE; exchange.out={}", new SourceTransformer().toString(exchange.getOutMessage().getContent()));
            client.done(exchange);
            // Wait for done to be delivered
            Thread.sleep(50);
        } finally {
            ctx.close();
        }
View Full Code Here

                populateExchange(exchange);
                client.sendSync(exchange);
                checkResult(exchange);
                //assertNotNull(exchange.getMessage("out").getContent());
                // TODO: check out the exchange
                client.done(exchange);

                // Stop and undeploy
                component.getServiceUnitManager().stop(suName);
                component.getServiceUnitManager().shutDown(suName);
                component.getServiceUnitManager().undeploy(suName,
View Full Code Here

        InOut me = client.createInOutExchange();
        me.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        me.setService(new QName("http://servicemix.org/test/", "routingSlip"));
        client.sendSync(me, 5000);
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        client.done(me);
    }

}
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.