Package org.apache.servicemix.jbi.api

Examples of org.apache.servicemix.jbi.api.Destination


    protected ServiceMixClient client;
    protected MessageList messageList = new MessageList();

    public void testInOnlyMessage() throws Exception {
        // START SNIPPET: message
        Destination destination = client.createDestination("service:http://servicemix.org/cheese/receiver");
        Message message = destination.createInOnlyMessage();
        message.setProperty("name", "James");
        message.setBody("<hello>world</hello>");
       
        client.send(message);
        // END SNIPPET: message
View Full Code Here


        messageList.assertMessagesReceived(1);
    }
   
    public void testInOnlyExchange() throws Exception {
        // START SNIPPET: inOnly
        Destination destination = client.createDestination("service:http://servicemix.org/cheese/receiver");
        InOnly exchange = destination.createInOnlyExchange();

        NormalizedMessage message = exchange.getInMessage();
        message.setProperty("name", "James");
        message.setContent(new StreamSource(new StringReader("<hello>world</hello>")));
View Full Code Here

        messageList.assertMessagesReceived(1);
    }
   
    public void testInOutExchange() throws Exception {
        // START SNIPPET: inOut
        Destination destination = client.createDestination("service:http://servicemix.org/cheese/myService");
        InOut exchange = destination.createInOutExchange();
       
        NormalizedMessage request = exchange.getInMessage();
        request.setProperty("name", "James");
        request.setContent(new StreamSource(new StringReader("<hello>world</hello>")));
View Full Code Here

        TestBean bean = new TestBean();
        bean.setName("James");
        bean.setLength(12);
        bean.getAddresses().addAll(Arrays.asList(new String[] {"London", "LA" }));

        Destination destination = client.createDestination("service:http://servicemix.org/cheese/receiver");
        Message message = destination.createInOnlyMessage();
        message.setProperty("name", "James");
        message.setBody(bean);

        client.send(message);
View Full Code Here

        fb.setJndiName(ClientFactory.DEFAULT_JNDI_NAME);
        fb.afterPropertiesSet();
        ClientFactory cf = (ClientFactory) fb.getObject();
        ServiceMixClient client = cf.createClient();
       
        Destination dest = client.createDestination("service::echo");
        InOut me = dest.createInOutExchange();
        me.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(me);
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        client.done(me);
        client.close();
View Full Code Here

    protected ServiceMixClient client;
    protected MessageList messageList = new MessageList();

    public void testInOnlyMessage() throws Exception {
        // START SNIPPET: message
        Destination destination = client.createDestination("service:http://servicemix.org/cheese/receiver");
        Message message = destination.createInOnlyMessage();
        message.setProperty("name", "James");
        message.setBody("<hello>world</hello>");
       
        client.send(message);
        // END SNIPPET: message
View Full Code Here

        messageList.assertMessagesReceived(1);
    }
   
    public void testInOnlyExchange() throws Exception {
        // START SNIPPET: inOnly
        Destination destination = client.createDestination("service:http://servicemix.org/cheese/receiver");
        InOnly exchange = destination.createInOnlyExchange();

        NormalizedMessage message = exchange.getInMessage();
        message.setProperty("name", "James");
        message.setContent(new StreamSource(new StringReader("<hello>world</hello>")));
View Full Code Here

        messageList.assertMessagesReceived(1);
    }
   
    public void testInOutExchange() throws Exception {
        // START SNIPPET: inOut
        Destination destination = client.createDestination("service:http://servicemix.org/cheese/myService");
        InOut exchange = destination.createInOutExchange();
       
        NormalizedMessage request = exchange.getInMessage();
        request.setProperty("name", "James");
        request.setContent(new StreamSource(new StringReader("<hello>world</hello>")));
View Full Code Here

        TestBean bean = new TestBean();
        bean.setName("James");
        bean.setLength(12);
        bean.getAddresses().addAll(Arrays.asList(new String[] {"London", "LA" }));

        Destination destination = client.createDestination("service:http://servicemix.org/cheese/receiver");
        Message message = destination.createInOnlyMessage();
        message.setProperty("name", "James");
        message.setBody(bean);

        client.send(message);
View Full Code Here

TOP

Related Classes of org.apache.servicemix.jbi.api.Destination

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.