Package org.mule.module.client

Examples of org.mule.module.client.RemoteDispatcher


    @Test
    @Ignore("Disabled because of MULE-4844")
    public void testRequestResponseComplex() throws Exception
    {
        MuleClient client = new MuleClient(muleContext);
        RemoteDispatcher dispatcher = client.getRemoteDispatcher("remoteEndpoint");
        dispatcher.setWireFormat(createObject(XStreamWireFormat.class));

        try
        {
            MuleMessage result = dispatcher.sendRemote(
                getMuleAddress(client, "inMyComponent3") + "/mycomponent3?method=getPerson", "Fred", null);
            assertNotNull(result);
            assertTrue(result.getPayload() instanceof Person);
            assertEquals("Fred", ((Person)result.getPayload()).getFirstName());
            assertEquals("Flintstone", ((Person)result.getPayload()).getLastName());
View Full Code Here


    @Test
    @Ignore("Disabled because of MULE-4844")
    public void testRequestResponseComplex2() throws Exception
    {
        MuleClient client = new MuleClient(muleContext);
        RemoteDispatcher dispatcher = client.getRemoteDispatcher("remoteEndpoint");
        dispatcher.setWireFormat(createObject(XStreamWireFormat.class));

        try
        {
            String[] args = new String[]{"Betty", "Rubble"};
            MuleMessage result = dispatcher.sendRemote(
                getMuleAddress(client, "inMyComponent3") + "/mycomponent3?method=addPerson", args, null);
            assertNotNull(result);
            assertTrue(result.getPayload() instanceof Person);
            assertEquals("Betty", ((Person)result.getPayload()).getFirstName());
            assertEquals("Rubble", ((Person)result.getPayload()).getLastName());
View Full Code Here

    @Test
    public void invokeRemoteEndpoint() throws Exception
    {
        //<start id="lis_12_remote-dispatch-2"/>
        MuleClient muleClient = new MuleClient(true);//<co id="lis_12_remote-dispatch-2_1"/>
        RemoteDispatcher remoteDispatcher =
             muleClient.getRemoteDispatcher("tcp://localhost:5555");//<co id="lis_12_remote-dispatch-2_2"/>
        FutureMessageResult asyncResponse =
            remoteDispatcher.sendAsyncRemote(//<co id="lis_12_remote-dispatch-2_3"/>
            "clientServiceChannel",
            TEST_CLIENT_ID,
            null);
        //<end id="lis_12_remote-dispatch-2"/>
View Full Code Here

    @Test
    public void invokeRemoteEndpoint() throws Exception
    {
        //<start id="lis_12_xml-remote-dispatch-2"/>
        MuleClient muleClient = new MuleClient(true);
        RemoteDispatcher remoteDispatcher =
             muleClient.getRemoteDispatcher("http://localhost:8080/_remoting");
        //<end id="lis_12_xml-remote-dispatch-2"/>
        FutureMessageResult asyncResponse = remoteDispatcher.sendAsyncRemote(
            "clientServiceChannel", TEST_CLIENT_ID, null);

        MuleMessage result = asyncResponse.getMessage();
        muleClient.dispose();
       
View Full Code Here

TOP

Related Classes of org.mule.module.client.RemoteDispatcher

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.