本文整理汇总了Java中org.apache.cxf.feature.Feature类的典型用法代码示例。如果您正苦于以下问题:Java Feature类的具体用法?Java Feature怎么用?Java Feature使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Feature类属于org.apache.cxf.feature包,在下文中一共展示了Feature类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: setFeatures
import org.apache.cxf.feature.Feature; //导入依赖的package包/类
public void setFeatures(List<Feature> f) {
features = f;
}
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:CxfEndpoint.java
示例17: getFeatures
import org.apache.cxf.feature.Feature; //导入依赖的package包/类
public List<Feature> getFeatures() {
return features;
}
开发者ID:HydAu,项目名称:Camel,代码行数:4,代码来源:CxfEndpoint.java
示例18: setFeatures
import org.apache.cxf.feature.Feature; //导入依赖的package包/类
/**
* Set the feature list to the CxfRs endpoint.
*/
public void setFeatures(List<Feature> features) {
this.features = features;
}
开发者ID:HydAu,项目名称:Camel,代码行数:7,代码来源:CxfRsEndpoint.java
示例19: createClientEndpointsProgramatically
import org.apache.cxf.feature.Feature; //导入依赖的package包/类
@Override
public <T extends ISingletonService> List<T> createClientEndpointsProgramatically(final CreateEndpointRequest<T> request)
{
final String jmsURL = Services.get(IJMSService.class).getJmsURL(request.getCConnection());
final JacksonJaxbJsonProvider jacksonJaxbJsonProvider = new JacksonJaxbJsonProvider();
final String clientURL = StringUtils.formatMessage(CLIENT_ADDRESS_URL_ENCODED,
request.getRequestQueue(),
request.getResponseQueue(),
jmsURL,
Long.toString(request.getTimeOutMillis()));
final List<T> result = new ArrayList<>();
for (final Class<T> endPointclass : request.getEndpointClasses())
{
final List<Feature> features;
if (loggingFeature == null)
{
logger.warn("No logging feature was wired for {}. Going without it", LoggingFeature.class);
features = Collections.emptyList();
}
else
{
features = Collections.singletonList((Feature)loggingFeature);
}
final T client = JAXRSClientFactory.create(clientURL,
endPointclass,
Collections.singletonList(jacksonJaxbJsonProvider),
features,
null); // not providing a particular configLocation);
WebClient.client(client)
.type(MediaType.APPLICATION_JSON_TYPE)
.accept(MediaType.APPLICATION_JSON_TYPE);
result.add(client);
}
logger.info("Created client endpoints for {}", request);
return result;
}
开发者ID:metasfresh,项目名称:metasfresh,代码行数:44,代码来源:JaxRsBL.java
示例20: configureEndpoint
import org.apache.cxf.feature.Feature; //导入依赖的package包/类
public static void configureEndpoint(final AbstractEndpointFactory svrFactory, final ServiceConfiguration configuration, final String prefix) {
final Properties beanConfig = configuration.getProperties();
if (beanConfig == null || beanConfig.isEmpty()) {
return;
}
final Collection<ServiceInfo> availableServices = configuration.getAvailableServices();
// endpoint properties
final Properties properties = ServiceInfos.serviceProperties(availableServices, beanConfig.getProperty(prefix + ENDPOINT_PROPERTIES));
if (properties != null) {
svrFactory.setProperties(PropertiesHelper.map(properties));
}
final String debugKey = prefix + DEBUG;
if ("true".equalsIgnoreCase(beanConfig.getProperty(debugKey, SystemInstance.get().getOptions().get(debugKey, "false")))) {
svrFactory.getProperties(true).put("faultStackTraceEnabled", "true");
}
// endpoint features
final String featuresIds = beanConfig.getProperty(prefix + FEATURES);
if (featuresIds != null) {
final List<? extends Feature> features = createFeatures(availableServices, featuresIds);
svrFactory.setFeatures(features);
}
configureInterceptors(svrFactory, prefix, availableServices, beanConfig);
// databinding
final String databinding = beanConfig.getProperty(prefix + DATABINDING);
if (databinding != null && !databinding.trim().isEmpty()) {
Object instance = ServiceInfos.resolve(availableServices, databinding);
if (instance == null) { // maybe id == classname
try {
instance = Thread.currentThread().getContextClassLoader().loadClass(databinding).newInstance();
} catch (Exception e) {
// ignore
}
}
if (!DataBinding.class.isInstance(instance)) {
throw new OpenEJBRuntimeException(instance + " is not a " + DataBinding.class.getName()
+ ", please check configuration of service [id=" + databinding + "]");
}
svrFactory.setDataBinding((DataBinding) instance);
}
// address: easier than using openejb-jar.xml
final String changedAddress = beanConfig.getProperty(prefix + ADDRESS);
if (changedAddress != null && !changedAddress.trim().isEmpty()) {
svrFactory.setAddress(changedAddress);
}
// published url
final String publishedUrl = beanConfig.getProperty(prefix + PUBLISHED_URL);
if (publishedUrl != null && !publishedUrl.trim().isEmpty()) {
svrFactory.setPublishedEndpointUrl(publishedUrl);
}
}
开发者ID:apache,项目名称:tomee,代码行数:60,代码来源:CxfUtil.java
注:本文中的org.apache.cxf.feature.Feature类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论