Examples of CxfEndpointBean


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

        try {
            // 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());
                endpoint.configure(svrBean);
                //Need to set the service name and endpoint name to the ClientFactoryBean's service factory
                // to walk around the issue of setting EndpointName and ServiceName
                CxfEndpointBean cxfEndpointBean = endpoint.getCxfEndpointBean();
                if (cxfEndpointBean.getServiceName() != null) {
                    svrBean.getServiceFactory().setServiceName(cxfEndpointBean.getServiceName());
                }
                if (cxfEndpointBean.getEndpointName() != null) {
                    svrBean.getServiceFactory().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

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();
        } else {
            if (endpoint.getServiceClass() == null) {
                throw new CamelException("serviceClass setting missing from CXF endpoint configuration");
            }
            try {
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();
            if (cfb == null) {
                cfb = CxfEndpointUtils.getClientFactoryBean(cxfEndpointBean.getServiceClass());
            }
            endpoint.configure(cfb);

        } else { // set up the clientFactoryBean by using URI information
            if (null != endpoint.getServiceClass()) {
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();
            svrBean = CxfEndpointUtils.getServerFactoryBean(endpointBean.getServiceClass());
            isWebServiceProvider = CxfEndpointUtils.hasAnnotation(endpointBean.getServiceClass(),
                                                                  WebServiceProvider.class);
            endpoint.configure(svrBean);

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

            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

    }
   
    // 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
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.