Examples of CxfEndpointBean


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

    private Client createClientForStreamMessge() throws CamelException {
        CxfClientFactoryBean cfb = new CxfClientFactoryBean();
        Class serviceClass = null;
        if (endpoint.isSpringContextEndpoint()) {
            CxfEndpointBean cxfEndpointBean = endpoint.getCxfEndpointBean();
            serviceClass = cxfEndpointBean.getServiceClass();
        } else {
            try {
                serviceClass = ClassLoaderUtils.loadClass(endpoint.getServiceClass(), this.getClass());
            } catch (ClassNotFoundException e) {
                throw new CamelException(e);
View Full Code Here

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

    // If cfb is null ,we will try to find a right cfb to use.
    private Client createClientFormClientFactoryBean(ClientFactoryBean cfb) throws CamelException {
        Bus bus = BusFactory.getDefaultBus();
        if (endpoint.isSpringContextEndpoint()) {
            CxfEndpointBean cxfEndpointBean = endpoint.getCxfEndpointBean();
            if (cfb == null) {
                cfb = CxfEndpointUtils.getClientFactoryBean(cxfEndpointBean.getServiceClass());
            }
            endpoint.configure(cfb);

            if (cxfEndpointBean.getServiceName() != null) {
                cfb.setServiceName(cxfEndpointBean.getServiceName());
            }
            if (cxfEndpointBean.getEndpointName() != null) {
                cfb.setEndpointName(cxfEndpointBean.getEndpointName());
            }
        } else { // set up the clientFactoryBean by using URI information
            if (null != endpoint.getServiceClass()) {
                try {
                    // we need to choice the right front end to create the
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);
            setEndpointHeaderFilterStrategy(result);
          
            // 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);     
            }
           
        } else {
            // endpoint URI does not specify a bean
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);     
            }
           
        } else {
            // endpoint URI does not specify a bean
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

        Endpoint.publish(address, implementor);
    }

    @Test
    public void testCreateWSDLOnly() {
        CxfEndpointBean ep = getMandatoryBean(CxfEndpointBean.class, "serviceEndpoint");

    }
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);     
            }
           
        } else {
            // endpoint URI does not specify a bean
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);     
            }
           
        } else {
            // endpoint URI does not specify a bean
View Full Code Here

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

  
    //If cfb is null ,we will try to find a right cfb to use.   
    private Client createClientFormClientFactoryBean(ClientFactoryBean cfb) throws CamelException {             
        Bus bus = BusFactory.getDefaultBus();
        if (endpoint.isSpringContextEndpoint()) {
            CxfEndpointBean endpointBean = endpoint.getCxfEndpointBean();
            if (cfb == null) {
                cfb = CxfEndpointUtils.getClientFactoryBean(endpointBean.getServiceClass());
            }   
            endpoint.configure(cfb);
            // 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) {
                cfb.getServiceFactory().setServiceName(cxfEndpointBean.getServiceName());
            }
            if (cxfEndpointBean.getEndpointName() != null) {
                cfb.getServiceFactory().setEndpointName(cxfEndpointBean.getEndpointName());
            }
        } else { // set up the clientFactoryBean by using URI information
            if (null != endpoint.getServiceClass()) {
                try {
                    //we need to choice the right front end to create the clientFactoryBean
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.