Examples of createInOnlyExchange()


Examples of org.apache.servicemix.client.Destination.createInOnlyExchange()

    public void testInOnlySyncWithSyncConsumer() throws Exception {
        TransactionManager tm = (TransactionManager) getBean("transactionManager");
        tm.begin();
        Destination dest = client.createDestination("endpoint:http://test/MyProviderService/synchronous");
        InOnly me = dest.createInOnlyExchange();
        me.getInMessage().setContent(new StringSource("<echo xmlns='http://test'><echoin0>world</echoin0></echo>"));
        client.sendSync(me);
        assertEquals(ExchangeStatus.DONE, me.getStatus());
        tm.commit();
        receiver.getMessageList().assertMessagesReceived(1);
View Full Code Here

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

        as.setComponentName("client");
        ServiceMixClient client = new DefaultServiceMixClient(jbi, as);
       
        int nbMsgs = 10;
        for (int i = 0; i < nbMsgs; i++) {
            InOnly me = client.createInOnlyExchange();
            me.setService(new QName("http://test", "entryPoint"));
            me.getInMessage().setContent(new StringSource(
                    "<test xmlns=\"http://test\"><echo/><world/><earth/></test>"));
            client.sendSync(me);
        }       
View Full Code Here

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

        as.setComponentName("client");
        ServiceMixClient client = new DefaultServiceMixClient(jbi, as);
       
        int nbMsgs = 100;
        for (int i = 0; i < nbMsgs; i++) {
            InOnly me = client.createInOnlyExchange();
            me.setService(new QName("http://test", "entryPoint"));
            me.getInMessage().setContent(new StringSource(
                    "<test xmlns=\"http://test\"><echo/><world/><earth/></test>"));
            client.send(me);
        }
View Full Code Here

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

        ServiceMixClient client = new DefaultServiceMixClient(jbi);

        ServiceEndpoint se = client.resolveEndpointReference(dynamicURI);
        assertNotNull("We should find a service endpoint!", se);

        InOnly exchange = client.createInOnlyExchange();
        exchange.setEndpoint(se);
        exchange.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(exchange);

        assertExchangeWorked(exchange);
View Full Code Here

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

        ServiceMixClient client = new DefaultServiceMixClient(jbi);

        ServiceEndpoint se = client.resolveEndpointReference(dynamicURI);
        assertNotNull("We should find a service endpoint!", se);

        InOnly exchange = client.createInOnlyExchange();
        exchange.setEndpoint(se);
        exchange.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(exchange);

        assertExchangeWorked(exchange);
View Full Code Here

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

        ServiceMixClient client = new DefaultServiceMixClient(jbi);

        ServiceEndpoint se = client.resolveEndpointReference("ftp://servicemix:rocks@localhost/smx/test");
        assertNotNull("We should find a service endpoint!", se);

        InOnly exchange = client.createInOnlyExchange();
        exchange.setEndpoint(se);
        exchange.getInMessage().setProperty(DefaultFileMarshaler.FILE_NAME_PROPERTY, "test.xml");
        exchange.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(exchange);
View Full Code Here

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

        ServiceMixClient client = new DefaultServiceMixClient(jbi);

        ServiceEndpoint se = client.resolveEndpointReference(uri);
        assertNotNull("We should find a service endpoint!", se);

        InOnly exchange = client.createInOnlyExchange();
        exchange.setEndpoint(se);
        exchange.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(exchange);

        assertExchangeWorked(exchange);
View Full Code Here

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

        ServiceMixClient client = new DefaultServiceMixClient(jbi);

        ServiceEndpoint se = client.resolveEndpointReference("xmpp://im.google.com/room");
        assertNotNull("We should find a service endpoint!", se);

        InOnly exchange = client.createInOnlyExchange();
        exchange.setEndpoint(se);
        exchange.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(exchange);

        assertExchangeWorked(exchange);
View Full Code Here

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

        }
    }

    public void testSendingToStaticEndpoint() throws Exception {
        ServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOnly me = client.createInOnlyExchange();
        me.setService(new QName("urn:test", "service"));
        NormalizedMessage message = me.getInMessage();

        message.setProperty("name", "cheese");
        message.setContent(new StringSource("<hello>world</hello>"));
View Full Code Here

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

    }
   
    public void testOk() throws Exception {
        Subject subject = login("first", "secret");
        ServiceMixClient client = new DefaultServiceMixClient(jbi);
        InOnly me = client.createInOnlyExchange();
        me.setService(ReceiverComponent.SERVICE);
        me.getInMessage().setSecuritySubject(subject);
        me.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(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.