Package org.apache.servicemix.client

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


        }
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        String out = new SourceTransformer().contentToString(me.getMessage("out"));
        log.info(out);
        log.info("Time: " + (t1 - t0));
        client.done(me);
    }

    protected AbstractXmlApplicationContext createBeanFactory() {
        return new ClassPathXmlApplicationContext("org/apache/servicemix/bpe/spring.xml");
    }
View Full Code Here


        InOut me = dest.createInOutExchange();
        me.getInMessage().setContent(new StringSource("<hello>world</hello>"));
        client.sendSync(me);
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        String str = new SourceTransformer().contentToString(me.getOutMessage());
        client.done(me);
        logger.info(str);
    }

    public void testSoapRoundtripProviderConsumerProvider() throws Exception {
        EchoComponent echo = new EchoComponent();
View Full Code Here

        DataHandler dh = new DataHandler(ds);
        me.getInMessage().addAttachment("image", dh);
        client.sendSync(me);
        assertEquals(ExchangeStatus.ACTIVE, me.getStatus());
        assertEquals(1, me.getOutMessage().getAttachmentNames().size());
        client.done(me);
    }

    private HttpEndpoint createInOnlyEndpoint(String name) {
        HttpEndpoint ep = createHttpEndpoint(name);
        ep.setDefaultMep(URI.create("http://www.w3.org/2004/08/wsdl/in-only"));
View Full Code Here

            }
        } else if (me.getFault() != null) {
            fail("Received fault: " + new SourceTransformer().toString(me.getFault().getContent()));
        }
        System.err.println(new SourceTransformer().toString(me.getOutMessage().getContent()));
        client.done(me);
    }
   
    protected AbstractXmlApplicationContext createBeanFactory() {
        return new ClassPathXmlApplicationContext("spring.xml");
    }
View Full Code Here

        client.sendSync(me);
        if (me.getError() != null) {
            throw me.getError();
        }
        assertTrue(me.getStatus() == ExchangeStatus.ACTIVE);
        client.done(me);
    }
   
    public static interface Echo {
        String echo(String msg);
    }
View Full Code Here

                fail("Received ERROR status");
            }
        } else {
            System.out.println(new SourceTransformer().toString(me.getOutMessage().getContent()));
        }
        client.done(me);
    }
   
    protected AbstractXmlApplicationContext createBeanFactory() {
        return new ClassPathXmlApplicationContext("spring.xml");
    }
View Full Code Here

        client.sendSync(me);
        if (me.getError() != null) {
            throw me.getError();
        }
        assertTrue(me.getStatus() == ExchangeStatus.ACTIVE);
        client.done(me);
    }
   
    public static interface Echo {
        String echo(String msg);
    }
View Full Code Here

        DefaultServiceMixClient client = new DefaultServiceMixClient(container);
        InOut me = client.createInOutExchange();
        me.setInterfaceName(new QName("http://jsr181.servicemix.apache.org", "ComplexPojoPortType"));
        me.getInMessage().setContent(new StringSource("<twoWay xmlns='http://jsr181.servicemix.apache.org'><in0>world</in0></twoWay>"));
        client.sendSync(me);
        client.done(me);
       
        // Wait all acks being processed
        Thread.sleep(100);
    }
   
View Full Code Here

        assertNotNull(me.getFault());
        Node n = transformer.toDOMNode(me.getFault());
        System.err.println(transformer.toString(n));
        assertNotNull(textValueOfXPath(n, "//message"));
        assertNull(textValueOfXPath(n, "//stack"));
        client.done(me);
       
        ((Jsr181LifeCycle) component.getLifeCycle()).getConfiguration().setPrintStackTraceInFaults(true);
       
        me = client.createInOutExchange();
        me.setInterfaceName(new QName("http://jsr181.servicemix.apache.org", "ComplexPojoPortType"));
View Full Code Here

        assertNotNull(me.getFault());
        n = transformer.toDOMNode(me.getFault());
        System.err.println(transformer.toString(n));
        assertNotNull(textValueOfXPath(n, "//message"));
        assertNotNull(textValueOfXPath(n, "//stack"));
        client.done(me);
       
        // Wait all acks being processed
        Thread.sleep(100);
    }
   
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.