Package org.mule.api.transport

Examples of org.mule.api.transport.MuleMessageFactory.create()


       
        InputStream stream = null;
        try
        {
            stream = new ReceiverFileInputStream(tempFile, false, null);
            MuleMessage message = factory.create(stream, encoding, muleContext);
            assertNotNull(message);
           
            // delete the file before accessing the payload to make sure it was properly converted
            // to byte[] by the message factory
            assertTrue(tempFile.delete());
View Full Code Here


        payload.setSubject("the subject");
        payload.setProperty("foo", "foo-value");
        payload.setPacketID(uuid);
    
        MuleMessageFactory factory = createMuleMessageFactory();
        MuleMessage message = factory.create(payload, encoding, muleContext);
        assertNotNull(message);
        assertEquals(Message.class, message.getPayload().getClass());
        assertEquals(TEST_MESSAGE, ((Message) message.getPayload()).getBody());
       
        assertEquals(uuid, message.getUniqueId());
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.