Package org.apache.servicemix.nmr.api

Examples of org.apache.servicemix.nmr.api.Exchange.display()


    }

    public void testDisplay() {
        Exchange e = new ExchangeImpl(Pattern.InOut);
        e.toString();
        e.display(false);
        e = new ExchangeImpl(Pattern.InOut);
        e.getIn();
        e.getOut();
        e.getFault();
        e.toString();
View Full Code Here


        Message msg = e.getIn();
        msg.setHeader("header", "value");
        msg.addAttachment("id", new BufferedInputStream(new ByteArrayInputStream(new byte[] { 1, 2, 3, 4 })));
        msg.setBody(new StringSource("<hello/>"));

        String str = e.display(false);
        LOG.info(str);
        assertNotNull(msg.getBody());
        assertTrue(msg.getBody() instanceof StringSource);
        assertNotNull(msg.getAttachment("id"));
        assertTrue(msg.getAttachment("id") instanceof BufferedInputStream);
View Full Code Here

        assertNotNull(msg.getBody());
        assertTrue(msg.getBody() instanceof StringSource);
        assertNotNull(msg.getAttachment("id"));
        assertTrue(msg.getAttachment("id") instanceof BufferedInputStream);

        str = e.display(true);
        LOG.info(str);
        assertNotNull(msg.getBody());
        assertTrue(msg.getBody() instanceof StringSource);
        assertNotNull(msg.getAttachment("id"));
        assertTrue(msg.getAttachment("id") instanceof ByteArrayInputStream);
View Full Code Here

    @Test
    public void testDisplay() {
        Exchange e = new ExchangeImpl(Pattern.InOut);
        e.toString();
        e.display(false);
        e = new ExchangeImpl(Pattern.InOut);
        e.getIn();
        e.getOut();
        e.getFault();
        e.toString();
View Full Code Here

        Message msg = e.getIn();
        msg.setHeader("header", "value");
        msg.addAttachment("id", new BufferedInputStream(new ByteArrayInputStream(new byte[] { 1, 2, 3, 4 })));
        msg.setBody(new StringSource("<hello/>"));

        String str = e.display(false);
        LOG.info(str);
        assertNotNull(msg.getBody());
        assertTrue(msg.getBody() instanceof StringSource);
        assertNotNull(msg.getAttachment("id"));
        assertTrue(msg.getAttachment("id") instanceof BufferedInputStream);
View Full Code Here

        assertNotNull(msg.getBody());
        assertTrue(msg.getBody() instanceof StringSource);
        assertNotNull(msg.getAttachment("id"));
        assertTrue(msg.getAttachment("id") instanceof BufferedInputStream);

        str = e.display(true);
        LOG.info(str);
        assertNotNull(msg.getBody());
        assertTrue(msg.getBody() instanceof DOMSource);
        assertNotNull(msg.getAttachment("id"));
        assertTrue(msg.getAttachment("id") instanceof ByteArrayInputStream);
View Full Code Here

        Message msg = e.getIn();
        msg.setHeader("header", "value");
        msg.addAttachment("id", new BufferedInputStream(new ByteArrayInputStream(new byte[] { 1, 2, 3, 4 })));
        msg.setBody(new StringSource("<hello/>"));

        String str = e.display(false);
        LOG.info(str);
        assertNotNull(msg.getBody());
        assertTrue(msg.getBody() instanceof StringSource);
        assertNotNull(msg.getAttachment("id"));
        assertTrue(msg.getAttachment("id") instanceof BufferedInputStream);
View Full Code Here

        assertTrue(msg.getBody() instanceof StringSource);
        assertNotNull(msg.getAttachment("id"));
        assertTrue(msg.getAttachment("id") instanceof BufferedInputStream);
        assertTrue(str.indexOf("<hello/>") == -1);

        str = e.display(true);
        LOG.info(str);
        assertNotNull(msg.getBody());
        assertTrue(msg.getBody() instanceof StringSource);
        assertNotNull(msg.getAttachment("id"));
        assertTrue(msg.getAttachment("id") instanceof ByteArrayInputStream);
View Full Code Here

        assertTrue(str.indexOf("<hello/>") != -1);

        // now switch to suppression mode
        System.setProperty(ExchangeUtils.SYSTEM_PROPERTY_SUPPRESS_CONTENT, "true");

        str = e.display(true);
        LOG.info(str);
        assertNotNull(msg.getBody());
        assertTrue(msg.getBody() instanceof StringSource);
        assertNotNull(msg.getAttachment("id"));
        assertTrue(msg.getAttachment("id") instanceof ByteArrayInputStream);
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.