Examples of createInOnlyExchange()


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

        DocumentFragment epr = URIResolver.createWSAEPR("bean:plainBean");
        ServiceEndpoint se = client.getContext().resolveEndpointReference(epr);
        assertNotNull("We should find a service endpoint!", se);

        InOnly exchange = client.createInOnlyExchange();
        exchange.setEndpoint(se);
        exchange.setOperation(new QName("methodWithPropertyParameterAndXPath"));
        NormalizedMessage inMessage = exchange.getInMessage();
        inMessage.setProperty("person", "James");
        inMessage.setContent(new StringSource("<hello address='London'>world</hello>"));
View Full Code Here

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

        DocumentFragment epr = URIResolver.createWSAEPR("bean:plainBean");
        ServiceEndpoint se = client.getContext().resolveEndpointReference(epr);
        assertNotNull("We should find a service endpoint!", se);

        InOnly exchange = client.createInOnlyExchange();
        exchange.setEndpoint(se);
        exchange.setOperation(new QName("methodWithPropertyParameterAndContent"));
        NormalizedMessage inMessage = exchange.getInMessage();
        inMessage.setProperty("person", "James");
        inMessage.setContent(new StringSource("<hello address='London'>world</hello>"));
View Full Code Here

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

        DefaultServiceMixClient client = new DefaultServiceMixClient(container);
        DocumentFragment epr = URIResolver.createWSAEPR("jms://queue/foo.bar.myqueue?jms.soap=true");
        ServiceEndpoint se = client.getContext().resolveEndpointReference(epr);
        assertNotNull(se);

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

        assertEquals(ExchangeStatus.DONE, inonly.getStatus());
View Full Code Here

Examples of org.apache.servicemix.client.DefaultServiceMixClient.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.DefaultServiceMixClient.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.DefaultServiceMixClient.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

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

    }
   
    public void testNOk() throws Exception {
        Subject subject = login("second", "password");
        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>"));
        try {
            client.sendSync(me);
View Full Code Here

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

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

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

    public void testInOnlySyncWithAsyncConsumer() throws Exception {
        TransactionManager tm = (TransactionManager) getBean("transactionManager");
        tm.begin();
        Destination dest = client.createDestination("endpoint:http://test/MyProviderService/async");
        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.Destination.createInOnlyExchange()

    public void testInOnlyWithSyncConsumer() 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.send(me);
        tm.commit();
        me = (InOnly) client.receive();
        assertEquals(ExchangeStatus.DONE, me.getStatus());
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.