Package org.mule

Examples of org.mule.DefaultMuleMessage$SerializedDataHandler


    }

    public void testResponseElement() throws MuleException, Exception
    {
        final MuleMessage result = muleContext.getClient().send("vm://response",
            new DefaultMuleMessage("", muleContext));

        assertNotNull(result);
        assertEquals("abcdefghi", result.getPayloadAsString());
    }
View Full Code Here


        assertEquals("abcdefghi", result.getPayloadAsString());
    }

    public void testAsyncOneWayEndpoint() throws MuleException, Exception
    {
        muleContext.getClient().send("vm://async-oneway-in", new DefaultMuleMessage("0", muleContext));
        final MuleMessage result = muleContext.getClient().request("vm://async-oneway-out", RECEIVE_TIMEOUT);
        final MuleMessage asyncResult = muleContext.getClient().request("vm://async-async-oneway-out",
            RECEIVE_TIMEOUT);

        assertNotNull(result);
View Full Code Here

    }

    public void testAsyncRequestResponseEndpoint() throws MuleException, Exception
    {
        muleContext.getClient().send("vm://async-requestresponse-in",
            new DefaultMuleMessage("0", muleContext));
        final MuleMessage result = muleContext.getClient().request("vm://async-requestresponse-out",
            RECEIVE_TIMEOUT);
        final MuleMessage asyncResult = muleContext.getClient().request(
            "vm://async-async-requestresponse-out", RECEIVE_TIMEOUT);
View Full Code Here

    public void testAsyncTransactionalEndpoint() throws MuleException, Exception
    {
        try
        {
            muleContext.getClient().send("vm://async-tx-in", new DefaultMuleMessage("0", muleContext));
            fail("Exception expected");
        }
        catch (DispatchException e)
        {
            // expected
View Full Code Here

    // }

    public void testMulticaster() throws MuleException, Exception
    {
        muleContext.getClient()
            .send("vm://multicaster-in", new DefaultMuleMessage(TEST_MESSAGE, muleContext));

        final MuleMessage result1 = muleContext.getClient().request("vm://multicaster-out1", RECEIVE_TIMEOUT);
        final MuleMessage result2 = muleContext.getClient().request("vm://multicaster-out2", RECEIVE_TIMEOUT);
        final MuleMessage result3 = muleContext.getClient().request("vm://multicaster-out3", RECEIVE_TIMEOUT);
View Full Code Here

    }

    public void testRecipientList() throws MuleException, Exception
    {
        muleContext.getClient().send("vm://recipient-list-in",
            new DefaultMuleMessage(TEST_MESSAGE, muleContext));

        final MuleMessage result1 = muleContext.getClient().request("vm://recipient-list-out1",
            RECEIVE_TIMEOUT);
        final MuleMessage result2 = muleContext.getClient().request("vm://recipient-list-out2",
            RECEIVE_TIMEOUT);
View Full Code Here

    }

    public void testChoiceWithoutOutboundEndpoints() throws MuleException, Exception
    {
        assertEquals("foo Hello foo", muleContext.getClient().send("vm://choice2-in",
            new DefaultMuleMessage("foo", muleContext)).getPayloadAsString());
        assertEquals("bar Hello bar", muleContext.getClient().send("vm://choice2-in",
            new DefaultMuleMessage("bar", muleContext)).getPayloadAsString());
        assertEquals("egh Hello ?", muleContext.getClient().send("vm://choice2-in",
            new DefaultMuleMessage("egh", muleContext)).getPayloadAsString());
    }
View Full Code Here

    }

    public void testFlowRef() throws MuleException, Exception
    {
        assertEquals("012xyzabc3", muleContext.getClient().send("vm://flow-ref-in",
            new DefaultMuleMessage("0", muleContext)).getPayloadAsString());

    }
View Full Code Here

    }

    public void testInvoke() throws MuleException, Exception
    {
        assertEquals("0recieved", muleContext.getClient().send("vm://invoke-in",
            new DefaultMuleMessage("0", muleContext)).getPayloadAsString());
    }
View Full Code Here

            new DefaultMuleMessage("0", muleContext)).getPayloadAsString());
    }

    public void testInvoke2() throws MuleException, Exception
    {
        MuleMessage message = new DefaultMuleMessage("0", muleContext);
        message.setOutboundProperty("one", "header1val");
        assertEquals("header1valrecieved", muleContext.getClient()
            .send("vm://invoke2-in", message)
            .getPayloadAsString());

    }
View Full Code Here

TOP

Related Classes of org.mule.DefaultMuleMessage$SerializedDataHandler

Copyright © 2018 www.massapicom. 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.