Search in sources :

Example 1 with LoggingFeature

use of org.apache.cxf.feature.LoggingFeature in project camel by apache.

the class CxfBeanEndpoint method createServer.

private void createServer(List<Object> serviceBeans) {
    Object obj = serviceBeans.get(0).getClass().getAnnotation(WebService.class);
    if (obj != null) {
        JaxWsServerFactoryBean bean = new JaxWsServerFactoryBean();
        bean.setTransportId(CxfBeanTransportFactory.TRANSPORT_ID);
        bean.setServiceClass(serviceBeans.get(0).getClass());
        // set the bean instance as well, otherwise CXF will re-create a new instance of the class
        bean.setServiceBean(serviceBeans.get(0));
        if (bean.getJaxWsServiceFactory() != null) {
            bean.getJaxWsServiceFactory().setPopulateFromClass(isPopulateFromClass());
        }
        bean.setBus(bus);
        bean.setStart(true);
        bean.setAddress("camel://" + createEndpointUri());
        if (loggingFeatureEnabled) {
            bean.getFeatures().add(new LoggingFeature());
        }
        server = bean.create();
    } else {
        JAXRSServerFactoryBean bean = new JAXRSServerFactoryBean();
        bean.setServiceBeans(serviceBeans);
        bean.setAddress("camel://" + createEndpointUri());
        bean.setStart(true);
        bean.setTransportId(CxfBeanTransportFactory.TRANSPORT_ID);
        bean.setBus(bus);
        if (loggingFeatureEnabled) {
            bean.getFeatures().add(new LoggingFeature());
        }
        bean.setProviders(providers);
        server = bean.create();
    }
}
Also used : LoggingFeature(org.apache.cxf.feature.LoggingFeature) JAXRSServerFactoryBean(org.apache.cxf.jaxrs.JAXRSServerFactoryBean) JaxWsServerFactoryBean(org.apache.cxf.jaxws.JaxWsServerFactoryBean)

Example 2 with LoggingFeature

use of org.apache.cxf.feature.LoggingFeature in project camel by apache.

the class RsServerBlueprintBean method setLoggingFeatureEnabled.

public void setLoggingFeatureEnabled(boolean loggingFeatureEnabled) {
    if (loggingFeature != null) {
        getFeatures().remove(loggingFeature);
        loggingFeature = null;
    }
    if (loggingFeatureEnabled) {
        if (getLoggingSizeLimit() > 0) {
            loggingFeature = new LoggingFeature(getLoggingSizeLimit());
        } else {
            loggingFeature = new LoggingFeature();
        }
        getFeatures().add(loggingFeature);
    }
}
Also used : LoggingFeature(org.apache.cxf.feature.LoggingFeature)

Example 3 with LoggingFeature

use of org.apache.cxf.feature.LoggingFeature in project camel by apache.

the class SpringJAXRSServerFactoryBean method setLoggingSizeLimit.

public void setLoggingSizeLimit(int loggingSizeLimit) {
    this.loggingSizeLimit = loggingSizeLimit;
    if (loggingFeature != null) {
        getFeatures().remove(loggingFeature);
        if (loggingSizeLimit > 0) {
            loggingFeature = new LoggingFeature(loggingSizeLimit);
        } else {
            loggingFeature = new LoggingFeature();
        }
        getFeatures().add(loggingFeature);
    }
}
Also used : LoggingFeature(org.apache.cxf.feature.LoggingFeature)

Example 4 with LoggingFeature

use of org.apache.cxf.feature.LoggingFeature in project camel by apache.

the class SpringJAXRSClientFactoryBean method setLoggingSizeLimit.

public void setLoggingSizeLimit(int loggingSizeLimit) {
    this.loggingSizeLimit = loggingSizeLimit;
    if (loggingFeature != null) {
        getFeatures().remove(loggingFeature);
        if (loggingSizeLimit > 0) {
            loggingFeature = new LoggingFeature(loggingSizeLimit);
        } else {
            loggingFeature = new LoggingFeature();
        }
        getFeatures().add(loggingFeature);
    }
}
Also used : LoggingFeature(org.apache.cxf.feature.LoggingFeature)

Example 5 with LoggingFeature

use of org.apache.cxf.feature.LoggingFeature in project camel by apache.

the class RsClientBlueprintBean method setLoggingFeatureEnabled.

public void setLoggingFeatureEnabled(boolean loggingFeatureEnabled) {
    if (loggingFeature != null) {
        getFeatures().remove(loggingFeature);
        loggingFeature = null;
    }
    if (loggingFeatureEnabled) {
        if (getLoggingSizeLimit() > 0) {
            loggingFeature = new LoggingFeature(getLoggingSizeLimit());
        } else {
            loggingFeature = new LoggingFeature();
        }
        getFeatures().add(loggingFeature);
    }
}
Also used : LoggingFeature(org.apache.cxf.feature.LoggingFeature)

Aggregations

LoggingFeature (org.apache.cxf.feature.LoggingFeature)11 CXFMessageDataFormatFeature (org.apache.camel.component.cxf.feature.CXFMessageDataFormatFeature)2 PayLoadDataFormatFeature (org.apache.camel.component.cxf.feature.PayLoadDataFormatFeature)2 RAWDataFormatFeature (org.apache.camel.component.cxf.feature.RAWDataFormatFeature)2 SourceDataBinding (org.apache.cxf.databinding.source.SourceDataBinding)2 JaxWsServerFactoryBean (org.apache.cxf.jaxws.JaxWsServerFactoryBean)2 FaultListener (org.apache.cxf.logging.FaultListener)2 WebServiceProvider (javax.xml.ws.WebServiceProvider)1 AuthorizationPolicy (org.apache.cxf.configuration.security.AuthorizationPolicy)1 JAXRSServerFactoryBean (org.apache.cxf.jaxrs.JAXRSServerFactoryBean)1