Package org.apache.servicemix.nmr.core

Examples of org.apache.servicemix.nmr.core.ExchangeImpl.display()


        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

        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.