Package org.apache.camel.component.cxf

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


    }

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


        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());
       
        cxfEndpoint = (CxfEndpoint) context.getEndpoint("cxf:bean:routerEndpoint");
        CxfConsumer consumer = (CxfConsumer)cxfEndpoint.createConsumer(new Processor() {
            public void process(Exchange exchange) throws Exception {
                // do nothing here               
            }           
        });
        assertNotNull("The consumer should not be null", consumer);       
View Full Code Here

    }

    public void testCheckServiceClassConsumer() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getNoServiceClassURI());
        try {
            endpoint.createConsumer(new NullProcessor());
        } 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 testCheckServiceClassConsumer() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getNoServiceClassURI());
        try {
            endpoint.createConsumer(new NullProcessor());
        } catch (IllegalArgumentException exception) {
            assertNotNull("Should get a CamelException here", exception);
            assertTrue(exception.getMessage().startsWith("serviceClass must be specified"));
        }
    }
View Full Code Here

        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());
       
        cxfEndpoint = context.getEndpoint("cxf:bean:routerEndpoint", CxfEndpoint.class);
        CxfConsumer consumer = (CxfConsumer)cxfEndpoint.createConsumer(new Processor() {
            public void process(Exchange exchange) throws Exception {
                // do nothing here               
            }           
        });
        assertNotNull("The consumer should not be null", consumer);       
View Full Code Here

        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());
       
        cxfEndpoint = (CxfEndpoint) context.getEndpoint("cxf:bean:routerEndpoint");
        CxfConsumer consumer = (CxfConsumer)cxfEndpoint.createConsumer(new Processor() {
            public void process(Exchange exchange) throws Exception {
                // do nothing here               
            }           
        });
        assertNotNull("The consumer should not be null", consumer);       
View Full Code Here

    @Test
    public void testCheckServiceClassConsumer() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getNoServiceClassURI());
        try {
            endpoint.createConsumer(new NullProcessor());
        } catch (IllegalArgumentException exception) {
            assertNotNull("Should get a CamelException here", exception);
            assertTrue(exception.getMessage().startsWith("serviceClass must be specified"));
        }
    }
View Full Code Here

    @Test
    public void testCheckServiceClassConsumer() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getNoServiceClassURI());
        try {
            endpoint.createConsumer(new NullProcessor());
        } catch (IllegalArgumentException exception) {
            assertNotNull("Should get a CamelException here", exception);
            assertTrue(exception.getMessage().startsWith("serviceClass must be specified"));
        }
    }
View Full Code Here

        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());
       
        cxfEndpoint = context.getEndpoint("cxf:bean:routerEndpoint", CxfEndpoint.class);
        CxfConsumer consumer = (CxfConsumer)cxfEndpoint.createConsumer(new Processor() {
            public void process(Exchange exchange) throws Exception {
                // do nothing here               
            }           
        });
        assertNotNull("The consumer should not be null", consumer);       
View Full Code Here

    @Test
    public void testCheckServiceClassConsumer() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getNoServiceClassURI());
        try {
            endpoint.createConsumer(new Processor() {

                @Override
                public void process(Exchange exchange) throws Exception {
                    // noop
                }
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.