本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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);
}
}
}
示例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;
}
示例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;
}
示例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);
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
}
}
示例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;
}
}
}
示例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;
}
示例14: addFeature
import org.apache.cxf.feature.Feature; //导入依赖的package包/类
public JaxrsServiceDescriptor addFeature(Feature feature) {
features.add(feature);
return this;
}
示例15: getFeatures
import org.apache.cxf.feature.Feature; //导入依赖的package包/类
List<Feature> getFeatures() {
return features;
}