当前位置: 首页>>代码示例>>Java>>正文


Java Feature类代码示例

本文整理汇总了Java中org.apache.cxf.feature.Feature的典型用法代码示例。如果您正苦于以下问题:Java Feature类的具体用法?Java Feature怎么用?Java Feature使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Feature类属于org.apache.cxf.feature包,在下文中一共展示了Feature类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: request

import org.apache.cxf.feature.Feature; //导入依赖的package包/类
@Bean(name="acaBulkRequestTransmitterService")
public BulkRequestTransmitterPortType request() {
    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.setAddress(propertyResolver.getProperty("bulk.url"));
    factory.setServiceClass(BulkRequestTransmitterPortType.class);
    List<Feature> features = new ArrayList<>();
    features.add(new LoggingFeature());
    factory.setFeatures(features);
    Map<String, Object> properties = new HashMap<>();
    properties.put("schema-validation-enabled",
            propertyResolver.getProperty("bulk.properties.schema-validation-enabled", Boolean.class, true));
    properties.put("mtom-enabled",
            propertyResolver.getProperty("bulk.properties.mtom-enabled", Boolean.class, true));
    factory.setProperties(properties);
    BulkRequestTransmitterPortType client = (BulkRequestTransmitterPortType) factory.create();
    return client;
}
 
开发者ID:sangramjadhav,项目名称:irsclient,代码行数:18,代码来源:WebServiceConfiguration.java

示例2: status

import org.apache.cxf.feature.Feature; //导入依赖的package包/类
@Bean(name="acaTransmitterStatusService")
public ACATransmitterStatusReqPortType status() {
    JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
    factory.setAddress(propertyResolver.getProperty("status.url"));
    factory.setServiceClass(ACATransmitterStatusReqPortType.class);
    List<Feature> features = new ArrayList<>();
    features.add(new LoggingFeature());
    factory.setFeatures(features);
    Map<String, Object> properties = new HashMap<>();
    properties.put("schema-validation-enabled",
            propertyResolver.getProperty("status.properties.schema-validation-enabled", Boolean.class, true));
    factory.setProperties(properties);
    ACATransmitterStatusReqPortType client = (ACATransmitterStatusReqPortType) factory.create();
    return client;
}
 
开发者ID:sangramjadhav,项目名称:irsclient,代码行数:16,代码来源:WebServiceConfiguration.java

示例3: clientEndPoint

import org.apache.cxf.feature.Feature; //导入依赖的package包/类
/**
 * Creates the {@link IServerSync} client endpoint which this application can use to talk to the metasfresh server.
 *
 * @return
 */
@Bean
public IServerSync clientEndPoint()
{
	if (useMockedServer)
	{
		logger.warn("Using mocked implementation for {}", IServerSync.class);
		return new MockedServerSync();
	}

	//
	// Get server's URL
	logger.info("mfprocurement.sync.url: {}", serverUrl);
	if (Strings.isNullOrEmpty(serverUrl))
	{
		logger.warn("Using null implementation for {}", IServerSync.class);
		return new NullServerSync();
	}

	//
	// Get MediaType
	final MediaType mediaType = getMediaType();

	//
	// Create the server binding.
	final JacksonJaxbJsonProvider jacksonJaxbJsonProvider = new JacksonJaxbJsonProvider();

	final IServerSync serverSync = JAXRSClientFactory.create(
			serverUrl.trim(),
			IServerSync.class,
			Collections.singletonList(jacksonJaxbJsonProvider),
			Collections.singletonList((Feature)loggingFeature),
			null); // not providing a particular configLocation
	WebClient.client(serverSync)
			.type(mediaType)
			.accept(mediaType);
	return serverSync;
}
 
开发者ID:metasfresh,项目名称:metasfresh-procurement-webui,代码行数:43,代码来源:SyncConfiguration.java

示例4: addFeatures

import org.apache.cxf.feature.Feature; //导入依赖的package包/类
public static void addFeatures(InterceptorProvider interceptorProvider, Bus bus, Map<String, String> properties) {
   final String features = properties.get(Constants.CXF_FEATURES_PROP);
   if (features != null) {
      MapToBeanConverter converter = new MapToBeanConverter(properties);
      for (Feature f : createFeatures(features, converter)) {
         f.initialize(interceptorProvider, bus);
      }
   }
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:10,代码来源:FeatureUtils.java

示例5: createFeatures

import org.apache.cxf.feature.Feature; //导入依赖的package包/类
private static List<Feature> createFeatures(String propValue, MapToBeanConverter converter) {
   List<Feature> list = new ArrayList<Feature>();
   StringTokenizer st = new StringTokenizer(propValue, ", ", false);
   
   while (st.hasMoreTokens()) {
      Feature feature = (Feature)newInstance(st.nextToken(), converter);
      if (feature != null) {
         list.add(feature);
      }
   }
   return list;
}
 
开发者ID:jbossws,项目名称:jbossws-cxf,代码行数:13,代码来源:FeatureUtils.java

示例6: bus

import org.apache.cxf.feature.Feature; //导入依赖的package包/类
@Bean(name = "bus")
Bus bus() {
    List<Feature> features = new ArrayList<Feature>();
    features.add(loggingFeature());
    cxf.setFeatures(features);

    return cxf;
}
 
开发者ID:code-not-found,项目名称:jaxws-cxf,代码行数:9,代码来源:CxfClient.java

示例7: addFeatures

import org.apache.cxf.feature.Feature; //导入依赖的package包/类
private void addFeatures() {
    LoggingFeature loggingFeature = new LoggingFeature();
    loggingFeature.setPrettyLogging(true);

    List<Feature> features = new ArrayList<Feature>();
    features.add(loggingFeature);
    
    bus.setFeatures(features);
}
 
开发者ID:code-not-found,项目名称:jaxws-cxf,代码行数:10,代码来源:HelloWorldBusImpl.java

示例8: addFeatures

import org.apache.cxf.feature.Feature; //导入依赖的package包/类
private void addFeatures() {
    List<Feature> features = new ArrayList<Feature>();

    // create a loggingFeature that will log all received/sent messages
    LoggingFeature loggingFeature = new LoggingFeature();
    loggingFeature.setPrettyLogging(true);
    features.add(loggingFeature);

    // set the features on the CXF bus
    bus.setFeatures(features);
}
 
开发者ID:code-not-found,项目名称:jaxws-cxf,代码行数:12,代码来源:HelloWorldCXFNonSpringServlet.java

示例9: addFeatures

import org.apache.cxf.feature.Feature; //导入依赖的package包/类
private void addFeatures() {
    // create a loggingFeature that will log all received/sent messages
    LoggingFeature loggingFeature = new LoggingFeature();
    loggingFeature.setPrettyLogging(true);

    List<Feature> features = new ArrayList<Feature>();
    features.add(loggingFeature);

    // set the features on the CXF bus
    bus.setFeatures(features);
}
 
开发者ID:code-not-found,项目名称:jaxws-cxf,代码行数:12,代码来源:HelloWorldBusImpl.java

示例10: configureCxfBus

import org.apache.cxf.feature.Feature; //导入依赖的package包/类
@Bean(name = "cxf", destroyMethod = "shutdown")
public SpringBus configureCxfBus() {
    final SpringBus bus = new SpringBus();
    List<Feature> features = new ArrayList<>();
    features.add(loggingFeature());
    bus.setFeatures(features);
    bus.setId("cxf");

    CamelTransportFactory camelTransportFactory = new CamelTransportFactory();
    camelTransportFactory.setCamelContext(camelContext);
    camelTransportFactory.setBus(bus);

    // bus.getExtension(CamelTransportFactory.class).setCamelContext(camelContext);
    return bus;
}
 
开发者ID:przodownikR1,项目名称:cxf_over_jms_kata,代码行数:16,代码来源:CxfConfig.java

示例11: checkAddressingEnabled

import org.apache.cxf.feature.Feature; //导入依赖的package包/类
private static void checkAddressingEnabled(org.apache.cxf.endpoint.Endpoint e) {
    for (Feature feature : e.getActiveFeatures()) {
        if (feature instanceof WSAddressingFeature) {
             //TODO: remove this DecoupledFaultHandler once CXF is upgraded, see JBWS-3516
            e.getInInterceptors().add(new DecoupledFaultHandler());
            e.getOutInterceptors().add(new AddressingInterceptor());
            e.getOutFaultInterceptors().add(new AddressingInterceptor());
            break;
        }
    }
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:12,代码来源:Interceptors.java

示例12: checkAddressingEnabled

import org.apache.cxf.feature.Feature; //导入依赖的package包/类
private static void checkAddressingEnabled(org.apache.cxf.endpoint.Endpoint e) {
    for (Feature feature : e.getActiveFeatures()) {
        if (feature instanceof WSAddressingFeature) {
             //TODO: remove this DecoupledFaultHandler once CXF is upgraded, see JBWS-3516
            e.getInInterceptors().add(new DecoupledFaultHandler());
            e.getOutInterceptors().add(new CXF3AddressingInterceptor());
            e.getOutFaultInterceptors().add(new CXF3AddressingInterceptor());
            break;
        }
    }
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:12,代码来源:Interceptors.java

示例13: createFeatures

import org.apache.cxf.feature.Feature; //导入依赖的package包/类
public static List<Feature> createFeatures(final Collection<ServiceInfo> availableServices, final String featuresIds) {
    final List<?> features = ServiceInfos.resolve(availableServices, featuresIds.split(","));
    for (final Object instance : features) {
        if (!AbstractFeature.class.isInstance(instance)) {
            throw new OpenEJBRuntimeException("feature should inherit from " + AbstractFeature.class.getName());
        }
    }
    return (List<Feature>) features;
}
 
开发者ID:apache,项目名称:tomee,代码行数:10,代码来源:CxfUtil.java

示例14: addFeature

import org.apache.cxf.feature.Feature; //导入依赖的package包/类
public JaxrsServiceDescriptor addFeature(Feature feature) {
    features.add(feature);
    return this;
}
 
开发者ID:Microbule,项目名称:microbule,代码行数:5,代码来源:DefaultJaxrsServiceDescriptor.java

示例15: getFeatures

import org.apache.cxf.feature.Feature; //导入依赖的package包/类
List<Feature> getFeatures() {
    return features;
}
 
开发者ID:Microbule,项目名称:microbule,代码行数:4,代码来源:DefaultJaxrsServiceDescriptor.java


注:本文中的org.apache.cxf.feature.Feature类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。