Package org.apache.camel.component.cxf

Examples of org.apache.camel.component.cxf.CxfEndpoint.createProducer()


    }

    public void testCheckServiceClassProcedure() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getNoServiceClassURI());
        try {
            endpoint.createProducer();
        } catch (CamelException exception) {
            assertNotNull("Should get a CamelException here", exception);
            assertEquals("serviceClass is required for CXF endpoint configuration", exception.getMessage());
        }
    }
View Full Code Here


public class CamelEndpointSpringConfigureTest extends SpringTestSupport {
   
    public void testCreateDestinationFromSpring() throws Exception {
        CxfEndpoint cxfEndpoint = (CxfEndpoint) context.getEndpoint("cxf:bean:serviceEndpoint");
        CxfProducer producer = (CxfProducer)cxfEndpoint.createProducer();
        assertNotNull("The producer should not be null", producer);       
        producer.start();
        CamelConduit conduit = (CamelConduit)producer.getClient().getConduit();
        assertTrue("we should get SpringCamelContext here", conduit.getCamelContext() instanceof SpringCamelContext);
        assertEquals("The context id should be camel_conduit", "camel_conduit", conduit.getCamelContext().getName());
View Full Code Here

    }

    public void testCheckServiceClassProcedure() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getNoServiceClassURI());
        try {
            endpoint.createProducer();
        } catch (ClassNotFoundException exception) {
            assertNotNull("Should get a ClassNotFoundException here", exception);
            assertEquals("Can't find serviceClass from uri, please check the cxf endpoint configuration", exception.getMessage());
        }
    }
View Full Code Here

    @Test
    public void testCheckServiceClassProcedure() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getNoServiceClassURI());
        try {
            endpoint.createProducer();
        } catch (IllegalArgumentException exception) {
            assertNotNull("Should get a CamelException here", exception);
        }
    }
View Full Code Here

public class CamelEndpointSpringConfigureTest extends CamelSpringTestSupport {
   
    @Test
    public void testCreateDestinationFromSpring() throws Exception {
        CxfEndpoint cxfEndpoint = context.getEndpoint("cxf:bean:serviceEndpoint", CxfEndpoint.class);
        CxfProducer producer = (CxfProducer)cxfEndpoint.createProducer();
        assertNotNull("The producer should not be null", producer);       
        producer.start();
        CamelConduit conduit = (CamelConduit)producer.getClient().getConduit();
        assertTrue("we should get SpringCamelContext here", conduit.getCamelContext() instanceof SpringCamelContext);
        assertEquals("The context id should be camel_conduit", "camel_conduit", conduit.getCamelContext().getName());
View Full Code Here

    }
   
    @Test
    public void testPropertiesSettingOnCxfClient() throws Exception {
        CxfEndpoint clientEndpoint = (CxfEndpoint)ctx.getBean("clientEndpoint");
        CxfProducer producer = (CxfProducer) clientEndpoint.createProducer();
        Client client = producer.getClient();
        HTTPConduit conduit = (HTTPConduit)client.getConduit();
        assertEquals("Got the wrong user name", "test", conduit.getAuthorization().getUserName());
    }
     
View Full Code Here

    }
   
    @Test
    public void testPropertiesSettingOnCxfClient() throws Exception {
        CxfEndpoint clientEndpoint = (CxfEndpoint)ctx.getBean("clientEndpoint");
        CxfProducer producer = (CxfProducer) clientEndpoint.createProducer();
        // need to start the producer to get the client
        producer.start();
        Client client = producer.getClient();
        HTTPConduit conduit = (HTTPConduit)client.getConduit();
        assertEquals("Got the wrong user name", "test", conduit.getAuthorization().getUserName());
View Full Code Here

public class CamelEndpointSpringConfigureTest extends CamelSpringTestSupport {
   
    @Test
    public void testCreateDestinationFromSpring() throws Exception {
        CxfEndpoint cxfEndpoint = (CxfEndpoint) context.getEndpoint("cxf:bean:serviceEndpoint");
        CxfProducer producer = (CxfProducer)cxfEndpoint.createProducer();
        assertNotNull("The producer should not be null", producer);       
        producer.start();
        CamelConduit conduit = (CamelConduit)producer.getClient().getConduit();
        assertTrue("we should get SpringCamelContext here", conduit.getCamelContext() instanceof SpringCamelContext);
        assertEquals("The context id should be camel_conduit", "camel_conduit", conduit.getCamelContext().getName());
View Full Code Here

    @Test
    public void testCheckServiceClassProcedure() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getNoServiceClassURI());
        try {
            endpoint.createProducer();
        } catch (IllegalArgumentException exception) {
            assertNotNull("Should get a CamelException here", exception);
        }
    }
View Full Code Here

    @Test
    public void testCheckServiceClassProcedure() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getNoServiceClassURI());
        try {
            endpoint.createProducer();
        } catch (IllegalArgumentException exception) {
            assertNotNull("Should get a CamelException here", exception);
        }
    }
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.