Package org.mule.api.client

Examples of org.mule.api.client.MuleClient.request()


    @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());
    }
    @Test
View Full Code Here

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

    @Test
    public void testEchoWsdlCustomBinding() throws Exception
    {
        MuleClient client = muleContext.getClient();
        MuleMessage result = client.request(((InboundEndpoint) muleContext.getRegistry()
            .lookupObject("httpInboundCustom")).getAddress()
                                            + "?wsdl", 5000);
        assertNotNull(result.getPayload());
    }
}
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());
        XMLUnit.compareXML(echoWsdl, result.getPayloadAsString());
    }
}
View Full Code Here

    public void testMessageTransformation() throws Exception
    {
        MuleClient client = muleContext.getClient();
        client.dispatch("vm://fromTest", createOutboundMessage());

        MuleMessage response = client.request("vm://toTest", RECEIVE_TIMEOUT);
        assertNotNull(response);

        String payload = response.getPayloadAsString();
        assertTrue(payload.contains("<author><name>Ross Mason</name></author>"));
    }
View Full Code Here

        Map<String,Object> props = new HashMap<String, Object>();
        MuleMessage result = client.send("cxfOutbound", "Dan", props);
        assertEquals("Hello Dan", result.getPayload());

        result = client.request("vm://out", 1000);
        assertFalse("chunked".equals(result.getOutboundProperty(HttpConstants.HEADER_TRANSFER_ENCODING)));
    }

    @Test
    public void testHttp10TransformerOnProtocol() throws Exception
View Full Code Here

        Map<String, Object> props = new HashMap<String, Object>();
        MuleMessage result = client.send("cxfOutbound2", "Dan", props);
        assertEquals("Hello Dan", result.getPayload());

        result = client.request("vm://out", 1000);
        assertFalse("chunked".equals(result.getOutboundProperty(HttpConstants.HEADER_TRANSFER_ENCODING)));
    }
}
View Full Code Here

        MuleClient client = muleContext.getClient();
        Map<String,Object> msgProps = new HashMap<String,Object>();
        msgProps.put("custom-header", "value-custom-header");
        client.dispatch("vm://in", "HelloWorld!", msgProps);

        MuleMessage reply = client.request("vm://out", 120000);
        Map<String, Object> headers = (Map<String, Object>) reply.getPayload();

        for (String header : HttpConstants.REQUEST_HEADER_NAMES.values())
        {
            // TODO: the Expect header should be sent on the request, it seems the apache commons HttpClient 3.1 has
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.