Package org.apache.camel.component.cxf

Examples of org.apache.camel.component.cxf.CxfEndpoint$CamelCxfClientImpl


    }
   
    @SuppressWarnings("deprecation")
    @Test
    public void testGetDataFormatMessage() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getEndpointURI() + sepChar() + "dataFormat=MESSAGE");
        assertEquals("We should get the Message DataFormat", DataFormat.MESSAGE, endpoint.getDataFormat());
    }
View Full Code Here


        CxfEndpoint endpoint = createEndpoint(getEndpointURI() + sepChar() + "dataFormat=MESSAGE");
        assertEquals("We should get the Message DataFormat", DataFormat.MESSAGE, endpoint.getDataFormat());
    }
    @Test
    public void testGetDataFormatCXF() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getEndpointURI() + sepChar() + "dataFormat=CXF_MESSAGE");
        assertEquals("We should get the Message DataFormat", DataFormat.CXF_MESSAGE, endpoint.getDataFormat());
    }
View Full Code Here

        CxfEndpoint endpoint = createEndpoint(getEndpointURI() + sepChar() + "dataFormat=CXF_MESSAGE");
        assertEquals("We should get the Message DataFormat", DataFormat.CXF_MESSAGE, endpoint.getDataFormat());
    }
    @Test
    public void testGetDataFormatRAW() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getEndpointURI() + sepChar() + "dataFormat=RAW");
        assertEquals("We should get the Message DataFormat", DataFormat.RAW, endpoint.getDataFormat());
    }
View Full Code Here

        assertEquals("We should get the Message DataFormat", DataFormat.RAW, endpoint.getDataFormat());
    }

    @Test
    public void testCheckServiceClassWithTheEndpoint() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getNoServiceClassURI());
        assertNull(endpoint.getServiceClass());
    }
View Full Code Here

        assertNull(endpoint.getServiceClass());
    }

    @Test
    public void testCheckServiceClassProcedure() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getNoServiceClassURI());
        assertNotNull(endpoint.createProducer());
    }
View Full Code Here

        assertNotNull(endpoint.createProducer());
    }

    @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

        return "cxf:bean:noServiceClassEndpoint";
    }

    @Test
    public void testGetServiceClass() throws Exception {
        CxfEndpoint endpoint = createEndpoint("cxf:bean:helloServiceEndpoint?serviceClass=#helloServiceImpl");     
        assertEquals("org.apache.camel.component.cxf.HelloServiceImpl",
                     endpoint.getServiceClass().getName());
    }
View Full Code Here

        assertEquals("We should get the right endpoint name", PORT_NAME, port);
    }

    @Test
    public void testGetDataFormatFromCxfEndpontProperties() throws Exception {
        CxfEndpoint endpoint = createEndpoint(getEndpointURI() + "?dataFormat=PAYLOAD");
        assertEquals("We should get the PAYLOAD DataFormat", DataFormat.PAYLOAD, endpoint.getDataFormat());
    }
View Full Code Here

        assertTrue(response, response.contains(responseExp));
    }

    @Test
    public void testMessageHeadersRelaysSpringContext() throws Exception {
        CxfEndpoint endpoint = context.getEndpoint("cxf:bean:serviceExtraRelays?headerFilterStrategy=#customMessageFilterStrategy", CxfEndpoint.class);
        CxfHeaderFilterStrategy strategy = (CxfHeaderFilterStrategy)endpoint.getHeaderFilterStrategy();
        List<MessageHeaderFilter> filters = strategy.getMessageHeaderFilters();
        assertEquals("Expected number of filters ", 2, filters.size());
        Map<String, MessageHeaderFilter> messageHeaderFilterMap = strategy.getMessageHeaderFiltersMap();
        for (String ns : new CustomHeaderFilter().getActivationNamespaces()) {
            assertEquals("Expected a filter class for namespace: " + ns,
View Full Code Here

        return new String[]{"org/apache/camel/component/cxf/spring/CxfEndpointBeans.xml"};
    }

    @Test
    public void testCxfEndpointBeanDefinitionParser() {
        CxfEndpoint routerEndpoint = (CxfEndpoint)ctx.getBean("routerEndpoint");
        assertEquals("Got the wrong endpoint address", "http://localhost:" + port1
                     + "/CxfEndpointBeanTest/router", routerEndpoint.getAddress());
        assertEquals("Got the wrong endpont service class", "org.apache.camel.component.cxf.HelloService",
                         routerEndpoint.getServiceClass().getName());
        assertEquals("Got the wrong handlers size", 1, routerEndpoint.getHandlers().size());
        assertEquals("Got the wrong schemalocations size", 1, routerEndpoint.getSchemaLocations().size());
        assertEquals("Got the wrong schemalocation", "classpath:wsdl/Message.xsd", routerEndpoint.getSchemaLocations().get(0));

        CxfEndpoint myEndpoint = (CxfEndpoint)ctx.getBean("myEndpoint");
        assertEquals("Got the wrong endpointName", endpointName, myEndpoint.getPortName());
        assertEquals("Got the wrong serviceName", serviceName, myEndpoint.getServiceName());
        assertTrue("We should get a soap binding", myEndpoint.getBindingConfig() instanceof SoapBindingConfiguration);
        SoapBindingConfiguration configuration = (SoapBindingConfiguration)myEndpoint.getBindingConfig();
        assertEquals("We should get a right soap version", "1.2", String.valueOf(configuration.getVersion().getVersion()));
       
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.component.cxf.CxfEndpoint$CamelCxfClientImpl

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.