Package org.apache.camel.component.cxf

Examples of org.apache.camel.component.cxf.CxfSpringEndpoint


            throw new IllegalArgumentException("The CxfEndpoint instance is null");
        }
        // CamelContext
        SpringCamelContext context = SpringCamelContext.springCamelContext(endpointBean.getApplicationContext());
        // The beanId will be set from endpointBean's property       
        Endpoint answer = new CxfSpringEndpoint(context, endpointBean);       
        return answer;
    }
View Full Code Here


            throw new IllegalArgumentException("The CxfEndpoint instance is null");
        }
        // CamelContext
        SpringCamelContext context = SpringCamelContext.springCamelContext(endpointBean.getApplicationContext());
        // The beanId will be set from endpointBean's property       
        CxfEndpoint answer = new CxfSpringEndpoint(context, endpointBean);
        // check the properties map
        if (endpointBean.getProperties() != null) {
            Map<String, Object> copy = new HashMap<String, Object>();
            copy.putAll(endpointBean.getProperties());
            EndpointHelper.setReferenceProperties(context, answer, copy);
            EndpointHelper.setProperties(context, answer, copy);
            answer.setMtomEnabled(Boolean.valueOf((String)copy.get(Message.MTOM_ENABLED)));
        }
        return answer;
    }
View Full Code Here

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

    @Test
    public void testGetProperties() throws Exception {
        CxfSpringEndpoint endpoint = (CxfSpringEndpoint)createEndpoint(getEndpointURI());
        QName service = endpoint.getBean().getServiceName();
        assertEquals("We should get the right service name", service, SERVICE_NAME);
        assertEquals("The cxf endpoint's DataFromat should be MESSAGE", DataFormat.MESSAGE, endpoint.getDataFormat());
       
        endpoint = (CxfSpringEndpoint)createEndpoint("cxf:bean:testPropertiesEndpoint");
        service = CxfEndpointUtils.getServiceName(endpoint);
        assertEquals("We should get the right service name", service, SERVICE_NAME);
        QName port = CxfEndpointUtils.getPortName(endpoint);
View Full Code Here

            throw new IllegalArgumentException("The CxfEndpoint instance is null");
        }
        // CamelContext
        SpringCamelContext context = SpringCamelContext.springCamelContext(endpointBean.getApplicationContext());
        // The beanId will be set from endpointBean's property       
        Endpoint answer = new CxfSpringEndpoint(context, endpointBean);       
        return answer;
    }
View Full Code Here

            throw new IllegalArgumentException("The CxfEndpoint instance is null");
        }
        // CamelContext
        SpringCamelContext context = SpringCamelContext.springCamelContext(endpointBean.getApplicationContext());
        // The beanId will be set from endpointBean's property       
        Endpoint answer = new CxfSpringEndpoint(context, endpointBean);       
        return answer;
    }
View Full Code Here

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

    @Test
    public void testGetProperties() throws Exception {
        CxfSpringEndpoint endpoint = (CxfSpringEndpoint)createEndpoint(getEndpointURI());
        QName service = endpoint.getBean().getServiceName();
        assertEquals("We should get the right service name", service, SERVICE_NAME);
        assertEquals("The cxf endpoint's DataFromat should be MESSAGE", DataFormat.MESSAGE, endpoint.getDataFormat());
       
        endpoint = (CxfSpringEndpoint)createEndpoint("cxf:bean:testPropertiesEndpoint");
        service = CxfEndpointUtils.getServiceName(endpoint);
        assertEquals("We should get the right service name", service, SERVICE_NAME);
        QName port = CxfEndpointUtils.getPortName(endpoint);
View Full Code Here

    }


    @Test
    public void testGetProperties() throws Exception {
        CxfSpringEndpoint endpoint = (CxfSpringEndpoint)createEndpoint(getEndpointURI());
        QName service = endpoint.getServiceName();
        assertEquals("We should get the right service name", SERVICE_NAME, service);
        assertEquals("The cxf endpoint's DataFromat should be RAW", DataFormat.RAW,
                     endpoint.getDataFormat().dealias());
       
        endpoint = (CxfSpringEndpoint)createEndpoint("cxf:bean:testPropertiesEndpoint");
        service = CxfEndpointUtils.getServiceName(endpoint);
        assertEquals("We should get the right service name", SERVICE_NAME, service);
        QName port = CxfEndpointUtils.getPortName(endpoint);
View Full Code Here

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

    @Test
    public void testGetProperties() throws Exception {
        CxfSpringEndpoint endpoint = (CxfSpringEndpoint)createEndpoint(getEndpointURI());
        QName service = endpoint.getServiceName();
        assertEquals("We should get the right service name", SERVICE_NAME, service);
        assertEquals("The cxf endpoint's DataFromat should be MESSAGE", DataFormat.MESSAGE, endpoint.getDataFormat());
       
        endpoint = (CxfSpringEndpoint)createEndpoint("cxf:bean:testPropertiesEndpoint");
        service = CxfEndpointUtils.getServiceName(endpoint);
        assertEquals("We should get the right service name", SERVICE_NAME, service);
        QName port = CxfEndpointUtils.getPortName(endpoint);
View Full Code Here

    }


    @Test
    public void testGetProperties() throws Exception {
        CxfSpringEndpoint endpoint = (CxfSpringEndpoint)createEndpoint(getEndpointURI());
        QName service = endpoint.getServiceName();
        assertEquals("We should get the right service name", SERVICE_NAME, service);
        assertEquals("The cxf endpoint's DataFromat should be RAW", DataFormat.RAW,
                     endpoint.getDataFormat().dealias());
       
        endpoint = (CxfSpringEndpoint)createEndpoint("cxf:bean:testPropertiesEndpoint");
        service = CxfEndpointUtils.getServiceName(endpoint);
        assertEquals("We should get the right service name", SERVICE_NAME, service);
        QName port = CxfEndpointUtils.getPortName(endpoint);
View Full Code Here

            throw new IllegalArgumentException("The CxfEndpoint instance is null");
        }
        // CamelContext
        SpringCamelContext context = SpringCamelContext.springCamelContext(endpointBean.getApplicationContext());
        // The beanId will be set from endpointBean's property       
        Endpoint answer = new CxfSpringEndpoint(context, endpointBean);       
        return answer;
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.component.cxf.CxfSpringEndpoint

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.