Package org.mule.api.client

Examples of org.mule.api.client.MuleClient


    }

    @Test
    public void testHttpsConnection() throws Exception
    {
        MuleClient client = muleContext.getClient();
        InboundEndpoint inboundEndpoint = (InboundEndpoint) muleContext.getRegistry().lookupObject("inTestUMO");
        MuleMessage m = client.send(
            inboundEndpoint.getAddress() + "?method=echo", new DefaultMuleMessage("hello", muleContext));
        assertNotNull(m);

        // check that our https connector is being used
        assertNotNull(endpoint);
View Full Code Here


    }

    @Test
    public void testSendSync() throws Exception
    {
        MuleClient client = muleContext.getClient();
        MuleMessage reply = client.send("vm://in", testMessage, null);
        assertNotNull(reply);

        assertEquals(NullPayload.getInstance(), reply.getPayload());

        Packet packet = jabberClient.receive(RECEIVE_TIMEOUT);
View Full Code Here

    public void testSecurityWithServletsUsingGet() throws Exception
    {
        Map<String, Object> props = new HashMap<String, Object>();
        props.put(HttpConnector.HTTP_METHOD_PROPERTY, "GET");

        MuleClient client = muleContext.getClient();
        MuleMessage result = client.send("http://ross:ross@localhost:" + HTTP_PORT
                                        + "/services/mycomponent?method=echo", "test", props);

        String status = result.getProperty(HttpConnector.HTTP_STATUS_PROPERTY, PropertyScope.INBOUND);
        assertEquals(401, new Integer(status).intValue());
View Full Code Here

    @Test
    public void testEncryptDecrypt() throws Exception
    {
        String payload = "this is a super simple test. Hope it works!!!";
        MuleClient client = muleContext.getClient();

        client.dispatch("vm://in", new DefaultMuleMessage(payload, muleContext));

        MuleMessage message = client.request("vm://out", 5000);
        assertNull(message);

        assertNotNull("flow's exception strategy should have caught an exception", exceptionFromFlow);
        InvalidPublicKeyException ipke =
            ExceptionUtils.getDeepestOccurenceOfType(exceptionFromFlow, InvalidPublicKeyException.class);
View Full Code Here

    @Test
    public void testEncryptDecrypt() throws Exception
    {
        String payload = "this is a super simple test. Hope it works!!!";
        MuleClient client = muleContext.getClient();

        client.send("vm://in", new DefaultMuleMessage(payload, muleContext));
        MuleMessage message = client.request("vm://out", 5000);
        assertEquals(payload, message.getPayloadAsString());
    }
View Full Code Here

    }

    @Test
    public void testEchoWsdl() throws Exception
    {
        MuleClient client = muleContext.getClient();
        MuleMessage result = client.request(((InboundEndpoint) muleContext.getRegistry()
            .lookupObject("httpInbound")).getAddress()
                                            + "?wsdl", 5000);
        assertNotNull(result.getPayload());
    }
View Full Code Here

    }

    @Test
    public void testEchoWsdlAegisBinding() throws Exception
    {
        MuleClient client = muleContext.getClient();
        MuleMessage result = client.request(((InboundEndpoint) muleContext.getRegistry()
            .lookupObject("httpInboundAegis")).getAddress()
                                            + "?wsdl", 5000);
        assertNotNull(result.getPayload());
    }
View Full Code Here

    }

    @Test
    public void testEchoWsdlSourceBinding() throws Exception
    {
        MuleClient client = muleContext.getClient();
        MuleMessage result = client.request(((InboundEndpoint) muleContext.getRegistry()
            .lookupObject("httpInboundSource")).getAddress()
                                            + "?wsdl", 5000);
        assertNotNull(result.getPayload());
    }
View Full Code Here

    }

    @Test
    public void testEchoWsdlJaxbBinding() throws Exception
    {
        MuleClient client = muleContext.getClient();
        MuleMessage result = client.request(((InboundEndpoint) muleContext.getRegistry()
            .lookupObject("httpInboundJaxb")).getAddress()
                                            + "?wsdl", 5000);
        assertNotNull(result.getPayload());
    }
View Full Code Here

    }

    @Test
    public void testEchoWsdlJibxBinding() throws Exception
    {
        MuleClient client = muleContext.getClient();
        MuleMessage result = client.request(((InboundEndpoint) muleContext.getRegistry()
            .lookupObject("httpInboundJibx")).getAddress()
                                            + "?wsdl", 5000);
        assertNotNull(result.getPayload());
    }
View Full Code Here

TOP

Related Classes of org.mule.api.client.MuleClient

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.