Examples of InOut


Examples of javax.jbi.messaging.InOut

        activateComponent(new ReturnOutComponent(), "target2");
        activateComponent(new ReturnOutComponent(), "target3");

        tm.begin();
       
        InOut me = client.createInOutExchange();
        me.setService(new QName("routingSlip"));
        me.getInMessage().setContent(createSource("<hello/>"));
        client.send(me);
       
        tm.commit();

        me = (InOut) client.receive();
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        assertEquals(Status.STATUS_ACTIVE, tm.getStatus());
        assertNotNull(me.getOutMessage());
        client.done(me);
       
        listener.assertExchangeCompleted();
    }
View Full Code Here

Examples of javax.jbi.messaging.InOut

    public void testInOutSync() throws Exception {
        activateComponent(new ReturnOutComponent(), "target");

        tm.begin();
       
        InOut me = client.createInOutExchange();
        me.setService(new QName("wireTap"));
        me.getInMessage().setContent(createSource("<hello/>"));
        client.sendSync(me);
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        client.done(me);
       
        tm.commit();
    }
View Full Code Here

Examples of javax.jbi.messaging.InOut

    public void testInOutAsync() throws Exception {
        activateComponent(new ReturnOutComponent(), "target");

        tm.begin();
       
        InOut me = client.createInOutExchange();
        me.setService(new QName("wireTap"));
        me.getInMessage().setContent(createSource("<hello/>"));
        client.send(me);
       
        tm.commit();
       
        me = (InOut) client.receive();
View Full Code Here

Examples of javax.jbi.messaging.InOut

       
        rec.getMessageList().assertMessagesReceived(1);
    }

    public void testInOut() throws Exception {
        InOut me = client.createInOutExchange();
        me.setService(new QName("messageFilter"));
        me.getInMessage().setContent(createSource("<hello><one/><two/><three/></hello>"));
        client.sendSync(me);
        assertEquals(ExchangeStatus.ERROR, me.getStatus());
    }
View Full Code Here

Examples of javax.jbi.messaging.InOut

       
        rec.getMessageList().assertMessagesReceived(3);
    }

    public void testInOut() throws Exception {
        InOut me = client.createInOutExchange();
        me.setService(new QName("splitter"));
        me.getInMessage().setContent(createSource("<hello><one/><two/><three/></hello>"));
        client.sendSync(me);
        assertEquals(ExchangeStatus.ERROR, me.getStatus());
    }
View Full Code Here

Examples of javax.jbi.messaging.InOut

            // Handle error exchanges
        } else if (exchange.getStatus() == ExchangeStatus.ERROR) {
            return;
        }

        InOut enricherTargetME = getExchangeFactory().createInOutExchange();
        enricherTarget.configureTarget(enricherTargetME, getContext());
        MessageUtil.transferInToIn(exchange, enricherTargetME);

        sendSync(enricherTargetME);

        if (enricherTargetME.getStatus() == ExchangeStatus.ERROR) {
            fail(exchange, enricherTargetME.getError());
            return;
        }

        Document document = combineToDOMDocument(exchange.getMessage("in"), enricherTargetME.getMessage("out"));

        done(enricherTargetME);

        MessageExchange outExchange = getExchangeFactory().createInOnlyExchange();
        NormalizedMessage out = outExchange.createMessage();
View Full Code Here

Examples of javax.jbi.messaging.InOut

    public void testDone() throws Exception {
        activateComponent(new ReturnOutComponent(), "target1");
        activateComponent(new ReturnOutComponent(), "target2");
        activateComponent(new ReturnOutComponent(), "target3");

        InOut me = client.createInOutExchange();
        me.setService(new QName("routingSlip"));
        me.getInMessage().setContent(createSource("<hello/>"));
        client.sendSync(me);
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        assertNotNull(me.getOutMessage());
        client.done(me);
       
        listener.assertExchangeCompleted();
    }
View Full Code Here

Examples of javax.jbi.messaging.InOut

    public void testFaultOnFirst() throws Exception {
        activateComponent(new ReturnFaultComponent(), "target1");
        activateComponent(new ReturnOutComponent(), "target2");
        activateComponent(new ReturnOutComponent(), "target3");

        InOut me = client.createInOutExchange();
        me.setService(new QName("routingSlip"));
        me.getInMessage().setContent(createSource("<hello/>"));
        client.sendSync(me);
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        assertNotNull(me.getFault());
        client.done(me);
       
        listener.assertExchangeCompleted();
    }
View Full Code Here

Examples of javax.jbi.messaging.InOut

    public void testErrorOnFirst() throws Exception {
        activateComponent(new ReturnErrorComponent(), "target1");
        activateComponent(new ReturnOutComponent(), "target2");
        activateComponent(new ReturnOutComponent(), "target3");

        InOut me = client.createInOutExchange();
        me.setService(new QName("routingSlip"));
        me.getInMessage().setContent(createSource("<hello/>"));
        client.sendSync(me);
        assertEquals(ExchangeStatus.ERROR, me.getStatus());
       
        listener.assertExchangeCompleted();
    }
View Full Code Here

Examples of javax.jbi.messaging.InOut

    public void testFaultOnSecond() throws Exception {
        activateComponent(new ReturnOutComponent(), "target1");
        activateComponent(new ReturnFaultComponent(), "target2");
        activateComponent(new ReturnOutComponent(), "target3");

        InOut me = client.createInOutExchange();
        me.setService(new QName("routingSlip"));
        me.getInMessage().setContent(createSource("<hello/>"));
        client.sendSync(me);
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        assertNotNull(me.getFault());
        client.done(me);
       
        listener.assertExchangeCompleted();
    }
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.