Package org.apache.servicemix.client

Examples of org.apache.servicemix.client.DefaultServiceMixClient.receive()


            me.getInMessage().setContent(new StringSource(
                    "<test xmlns=\"http://test\"><echo/><world/><earth/></test>"));
            client.send(me);
        }
        for (int i = 0; i < nbMsgs; i++) {
            client.receive();
        }
        ((Receiver) getBean("trace1")).getMessageList().assertMessagesReceived(1 * nbMsgs);
        ((Receiver) getBean("trace2")).getMessageList().assertMessagesReceived(1 * nbMsgs);
        ((Receiver) getBean("trace3")).getMessageList().assertMessagesReceived(1 * nbMsgs);
        ((Receiver) getBean("trace4")).getMessageList().assertMessagesReceived(2 * nbMsgs);
 
View Full Code Here


        me.getInMessage().setContent(new StringSource("<hello>world</hello>"));
       
        tm.begin();
        client.send(me);
        tm.commit();
        me = (InOut) client.receive();
        client.done(me);
    }
   
}
View Full Code Here

        me.getInMessage().setContent(new StringSource("<hello>world</hello>"));
       
        tm.begin();
        client.send(me);
        tm.commit();
        me = (InOut) client.receive();
        client.done(me);
    }
   
}
View Full Code Here

            InOut inOut = client.createInOutExchange(service, null, null);
            NormalizedMessage inMessage = inOut.createMessage();
            inMessage.setContent(new StringSource("<test id='" + i + "'/>"));
            inOut.setInMessage(inMessage);
            client.send(inOut);
            inOut = (InOut) client.receive(1000);
            assertNotNull(inOut.getOutMessage());
            client.done(inOut);
        }
    }
View Full Code Here

                    "<test xmlns=\"http://test\"><echo/><world/><earth/></test>"));
            client.send(me);
        }
        Thread.sleep(2000);
        for (int i = 0; i < nbMsgs; i++) {
            client.receive();
        }
        Thread.sleep(2000);
        ((Receiver) getBean("trace1")).getMessageList().assertMessagesReceived(1 * nbMsgs);
        ((Receiver) getBean("trace2")).getMessageList().assertMessagesReceived(1 * nbMsgs);
        ((Receiver) getBean("trace3")).getMessageList().assertMessagesReceived(1 * nbMsgs);
 
View Full Code Here

            InOut inOut = client.createInOutExchange(service, null, null);
            NormalizedMessage inMessage = inOut.createMessage();
            inMessage.setContent(new StringSource("<test id='" + i + "'/>"));
            inOut.setInMessage(inMessage);
            client.send(inOut);
            inOut = (InOut) client.receive(1000);
            assertNotNull(inOut.getOutMessage());
            client.done(inOut);
        }
    }
View Full Code Here

            me.setService(new QName("http://test", "entryPoint"));
            me.getInMessage().setContent(new StringSource("<test xmlns=\"http://test\"><echo/><world/><earth/></test>"));
            client.send(me);
        }
        for (int i = 0; i < nbMsgs; i++) {
            client.receive();
        }
        ((Receiver) getBean("trace1")).getMessageList().assertMessagesReceived(1 * nbMsgs);
        ((Receiver) getBean("trace2")).getMessageList().assertMessagesReceived(1 * nbMsgs);
        ((Receiver) getBean("trace3")).getMessageList().assertMessagesReceived(1 * nbMsgs);
        ((Receiver) getBean("trace4")).getMessageList().assertMessagesReceived(2 * nbMsgs);
 
View Full Code Here

        me.getInMessage().setContent(new StringSource("<hello>world</hello>"));
       
        tm.begin();
        client.send(me);
        tm.commit();
        me = (InOut) client.receive();
        client.done(me);
    }
   
}
View Full Code Here

            InOut inOut = client.createInOutExchange(service, null, null);
            NormalizedMessage inMessage = inOut.createMessage();
            inMessage.setContent(new StringSource("<test id='" + i + "'/>"));
            inOut.setInMessage(inMessage);
            client.send(inOut);
            inOut = (InOut) client.receive(1000);
            assertNotNull(inOut.getOutMessage());
            client.done(inOut);
        }
    }
   
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.