Examples of CxfEndpointBean


Examples of org.apache.camel.component.cxf.spring.CxfEndpointBean

    private Client createClientForStreamMessage() throws CamelException {
        CxfClientFactoryBean cfb = new CxfClientFactoryBean();
        Class serviceClass = null;
        if (endpoint.isSpringContextEndpoint()) {
            CxfEndpointBean cxfEndpointBean = endpoint.getCxfEndpointBean();
            serviceClass = cxfEndpointBean.getServiceClass();
            CxfEndpointUtils.checkServiceClass(serviceClass);
        } else {
            CxfEndpointUtils.checkServiceClassName(endpoint.getServiceClass());
            try {
                serviceClass = ClassLoaderUtils.loadClass(endpoint.getServiceClass(), this.getClass());
View Full Code Here

Examples of org.apache.camel.component.cxf.spring.CxfEndpointBean

        } else {
            // now we just use the default bus here
            bus = BusFactory.getDefaultBus();
        }
        if (endpoint.isSpringContextEndpoint()) {
            CxfEndpointBean cxfEndpointBean = endpoint.getCxfEndpointBean();
            CxfEndpointUtils.checkServiceClass(cxfEndpointBean.getServiceClass());
            if (cfb == null) {
                cfb = CxfEndpointUtils.getClientFactoryBean(cxfEndpointBean.getServiceClass());
            }
            endpoint.configure(cfb);

        } else { // set up the clientFactoryBean by using URI information
            CxfEndpointUtils.checkServiceClassName(endpoint.getServiceClass());
View Full Code Here

Examples of org.apache.camel.component.cxf.spring.CxfEndpointBean

    }

    public static boolean getSetDefaultBus(CxfEndpoint endpoint) {
        Boolean isSetDefaultBus = null;
        // check the value of cxfEndpointBean's property
        CxfEndpointBean cxfEndpointBean = endpoint.getCxfEndpointBean();
        if (cxfEndpointBean != null && cxfEndpointBean.getProperties() != null) {
            String value =  (String)cxfEndpointBean.getProperties().get(CxfConstants.SET_DEFAULT_BUS);
            isSetDefaultBus = Boolean.valueOf(value);
        }
        // We will get the value from the cxfEndpontBean's properties
        if (isSetDefaultBus != null && endpoint.isSetDefaultBus() == null) {
            return isSetDefaultBus.booleanValue();
View Full Code Here

Examples of org.apache.camel.component.cxf.spring.CxfEndpointBean

    }

    public static DataFormat getDataFormat(CxfEndpoint endpoint) throws CamelException {
        String dataFormatString = endpoint.getDataFormat();
        if (dataFormatString == null) {
            CxfEndpointBean cxfEndpointBean = endpoint.getCxfEndpointBean();
            if (cxfEndpointBean != null && cxfEndpointBean.getProperties() != null) {
                dataFormatString = (String) cxfEndpointBean.getProperties().get(CxfConstants.DATA_FORMAT);
            }
        }

        // return the default value if nothing is set
        if (dataFormatString == null) {
View Full Code Here

Examples of org.apache.camel.component.cxf.spring.CxfEndpointBean

            bus = BusFactory.getDefaultBus();
        }
        ServerFactoryBean svrBean = null;

        if (endpoint.isSpringContextEndpoint()) {
            CxfEndpointBean endpointBean = endpoint.getCxfEndpointBean();
            CxfEndpointUtils.checkServiceClass(endpointBean.getServiceClass());
            svrBean = CxfEndpointUtils.getServerFactoryBean(endpointBean.getServiceClass());
            isWebServiceProvider = CxfEndpointUtils.hasAnnotation(endpointBean.getServiceClass(),
                                                                  WebServiceProvider.class);
            endpoint.configure(svrBean);

        } else { // setup the serverFactoryBean with the URI parameters
            CxfEndpointUtils.checkServiceClassName(endpoint.getServiceClass());
View Full Code Here

Examples of org.apache.camel.component.cxf.spring.CxfEndpointBean

    }

    public static boolean getSetDefaultBus(CxfEndpoint endpoint) {
        Boolean isSetDefaultBus = null;
        // check the value of cxfEndpointBean's property
        CxfEndpointBean cxfEndpointBean = endpoint.getCxfEndpointBean();
        if (cxfEndpointBean != null && cxfEndpointBean.getProperties() != null) {
            String value =  (String)cxfEndpointBean.getProperties().get(CxfConstants.SET_DEFAULT_BUS);
            isSetDefaultBus = Boolean.valueOf(value);
        }
        // We will get the value from the cxfEndpontBean's properties
        if (isSetDefaultBus != null && endpoint.isSetDefaultBus() == null) {
            return isSetDefaultBus.booleanValue();
View Full Code Here

Examples of org.apache.camel.component.cxf.spring.CxfEndpointBean

    }  

   
    public static String getCxfEndpointPropertyValue(CxfEndpoint endpoint, String property) {
        String result = null;
        CxfEndpointBean cxfEndpointBean = endpoint.getCxfEndpointBean();
        if (cxfEndpointBean != null && cxfEndpointBean.getProperties() != null) {
            result = (String) cxfEndpointBean.getProperties().get(property);
        }
        return result;
    }
View Full Code Here

Examples of org.apache.camel.component.cxf.spring.CxfEndpointBean

    }
   
    // only used by test currently
    public static String getCxfEndpointPropertyValue(CxfSpringEndpoint endpoint, String property) {
        String result = null;
        CxfEndpointBean cxfEndpointBean = endpoint.getBean();
        if (cxfEndpointBean != null && cxfEndpointBean.getProperties() != null) {
            result = (String) cxfEndpointBean.getProperties().get(property);
        }
        return result;
    }
View Full Code Here

Examples of org.apache.camel.component.cxf.spring.CxfEndpointBean

            String beanId = remaining.substring(CxfConstants.SPRING_CONTEXT_ENDPOINT.length());
            if (beanId.startsWith("//")) {
                beanId = beanId.substring(2);
            }

            CxfEndpointBean bean = CamelContextHelper.mandatoryLookup(getCamelContext(), beanId,
                    CxfEndpointBean.class);

            result = new CxfSpringEndpoint(this, bean);
          
            // Apply Spring bean properties (including # notation referenced bean).  Note that the
            // Spring bean properties values can be overridden by property defined in URI query.
            // The super class (DefaultComponent) will invoke "setProperties" after this method
            // with to apply properties defined by URI query.
            if (bean.getProperties() != null) {
                Map<String, Object> copy = new HashMap<String, Object>();
                copy.putAll(bean.getProperties());    
                setProperties(result, copy);     
                result.setMtomEnabled(Boolean.valueOf((String)copy.get(Message.MTOM_ENABLED)));
            }
           
        } else {
View Full Code Here

Examples of org.apache.camel.component.cxf.spring.CxfEndpointBean

        // now we just use the default bus here
        Bus bus = BusFactory.getDefaultBus();
        ServerFactoryBean svrBean = null;

        if (endpoint.isSpringContextEndpoint()) {
            CxfEndpointBean endpointBean = endpoint.getCxfEndpointBean();
            svrBean = CxfEndpointUtils.getServerFactoryBean(endpointBean.getServiceClass());
            isWebServiceProvider = CxfEndpointUtils.hasAnnotation(endpointBean.getServiceClass(),
                                                                  WebServiceProvider.class);
            endpoint.configure(svrBean);
            CxfEndpointBean cxfEndpointBean = endpoint.getCxfEndpointBean();
            if (cxfEndpointBean.getServiceName() != null) {
                svrBean.setServiceName(cxfEndpointBean.getServiceName());
            }
            if (cxfEndpointBean.getEndpointName() != null) {
                svrBean.setEndpointName(cxfEndpointBean.getEndpointName());
            }

        } else { // setup the serverFactoryBean with the URI paraments
            Class serviceClass = ClassLoaderUtils.loadClass(endpoint.getServiceClass(), this.getClass());
            svrBean = CxfEndpointUtils.getServerFactoryBean(serviceClass);
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.