Package org.apache.camel.component.cxf.invoker

Examples of org.apache.camel.component.cxf.invoker.CxfClientFactoryBean


            client = createClientForStreamMessage();
        }
    }

    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());
            } catch (ClassNotFoundException e) {
                throw new CamelException(e);
            }
        }

        boolean jsr181Enabled = CxfEndpointUtils.hasWebServiceAnnotation(serviceClass);
        cfb.setJSR181Enabled(jsr181Enabled);

        dataFormat = CxfEndpointUtils.getDataFormat(endpoint);
        List<AbstractFeature> features = new ArrayList<AbstractFeature>();
        if (dataFormat.equals(DataFormat.MESSAGE)) {
            features.add(new MessageDataFormatFeature());
            // features.add(new LoggingFeature());
        } else if (dataFormat.equals(DataFormat.PAYLOAD)) {
            features.add(new PayLoadDataFormatFeature());
            // features.add(new LoggingFeature());
        }
        cfb.setFeatures(features);

        return createClientFromClientFactoryBean(cfb);
    }
View Full Code Here


            client = createClientForStreamMessage();
        }
    }

    private Client createClientForStreamMessage() throws Exception {
        CxfClientFactoryBean cfb = new CxfClientFactoryBean();
        Class serviceClass = null;
        try {
            serviceClass = CxfEndpointUtils.getServiceClass(endpoint);
        } catch (ClassNotFoundException e) {
            throw new CamelException(e);
        }      
       
        boolean jsr181Enabled = CxfEndpointUtils.hasWebServiceAnnotation(serviceClass);
        cfb.setJSR181Enabled(jsr181Enabled);
      
        return createClientFromClientFactoryBean(jsr181Enabled ? new JaxWsProxyFactoryBean(cfb)
            : new ClientProxyFactoryBean(cfb));
    }
View Full Code Here

            client = createClientForStreamMessge();
        }
    }

    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);
            }
        }

        boolean jsr181Enabled = CxfEndpointUtils.hasWebServiceAnnotation(serviceClass);
        cfb.setJSR181Enabled(jsr181Enabled);

        dataFormat = CxfEndpointUtils.getDataFormat(endpoint);
        List<AbstractFeature> features = new ArrayList<AbstractFeature>();
        if (dataFormat.equals(DataFormat.MESSAGE)) {
            features.add(new MessageDataFormatFeature());
            // features.add(new LoggingFeature());
        }
        if (dataFormat.equals(DataFormat.PAYLOAD)) {
            features.add(new PayLoadDataFormatFeature());
            // features.add(new LoggingFeature());
        }
        cfb.setFeatures(features);

        return createClientFormClientFactoryBean(cfb);
    }
View Full Code Here

            client = createClientForStreamMessage();
        }
    }

    private Client createClientForStreamMessage() throws Exception {
        CxfClientFactoryBean cfb = new CxfClientFactoryBean();
        Class serviceClass = null;
        try {
            serviceClass = CxfEndpointUtils.getServiceClass(endpoint);
        } catch (ClassNotFoundException e) {
            throw new CamelException(e);
        }      
       
        boolean jsr181Enabled = CxfEndpointUtils.hasWebServiceAnnotation(serviceClass);
        cfb.setJSR181Enabled(jsr181Enabled);
      
        return createClientFromClientFactoryBean(jsr181Enabled ? new JaxWsProxyFactoryBean(cfb)
            : new ClientProxyFactoryBean(cfb));
    }
View Full Code Here

            client = createClientForStreamMessage();
        }
    }

    private Client createClientForStreamMessage() throws Exception {
        CxfClientFactoryBean cfb = new CxfClientFactoryBean();
        Class serviceClass = null;
        try {
            serviceClass = CxfEndpointUtils.getServiceClass(endpoint);
        } catch (ClassNotFoundException e) {
            throw new CamelException(e);
        }      
       
        boolean jsr181Enabled = CxfEndpointUtils.hasWebServiceAnnotation(serviceClass);
        cfb.setJSR181Enabled(jsr181Enabled);
      
        return createClientFromClientFactoryBean(jsr181Enabled ? new JaxWsProxyFactoryBean(cfb)
            : new ClientProxyFactoryBean(cfb));
    }
View Full Code Here

            client = createClientForStreamMessge();          
        }
    }
   
    private Client createClientForStreamMessge() throws CamelException {
        CxfClientFactoryBean cfb = new CxfClientFactoryBean();
        if (null != endpoint.getServiceClass()) {
            try {
                Class serviceClass = ClassLoaderUtils.loadClass(endpoint.getServiceClass(), this.getClass());
                boolean jsr181Enabled = CxfEndpointUtils.hasWebServiceAnnotation(serviceClass);
                cfb.setJSR181Enabled(jsr181Enabled);
            } catch (ClassNotFoundException e) {
                throw new CamelException(e);
            }
        }
        return createClientFormClientFactoryBean(cfb);
View Full Code Here

            client = createClientForStreamMessage();
        }
    }

    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 {
                serviceClass = ClassLoaderUtils.loadClass(endpoint.getServiceClass(), this.getClass());
            } catch (ClassNotFoundException e) {
                throw new CamelException(e);
            }
        }

        boolean jsr181Enabled = CxfEndpointUtils.hasWebServiceAnnotation(serviceClass);
        cfb.setJSR181Enabled(jsr181Enabled);

        dataFormat = CxfEndpointUtils.getDataFormat(endpoint);
        List<AbstractFeature> features = new ArrayList<AbstractFeature>();
        if (dataFormat.equals(DataFormat.MESSAGE)) {
            features.add(new MessageDataFormatFeature());
            // features.add(new LoggingFeature());
        } else if (dataFormat.equals(DataFormat.PAYLOAD)) {
            features.add(new PayLoadDataFormatFeature());
            // features.add(new LoggingFeature());
        }
        cfb.setFeatures(features);

        return createClientFromClientFactoryBean(cfb);
    }
View Full Code Here

TOP

Related Classes of org.apache.camel.component.cxf.invoker.CxfClientFactoryBean

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.