本文整理了Java中com.sun.xml.ws.binding.WebServiceFeatureList
类的一些代码示例,展示了WebServiceFeatureList
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebServiceFeatureList
类的具体详情如下:
包路径:com.sun.xml.ws.binding.WebServiceFeatureList
类名称:WebServiceFeatureList
[英]Represents a list of WebServiceFeatures that has bunch of utility methods pertaining to web service features.
[中]表示具有一系列与web服务功能相关的实用程序方法的WebServiceFeatures的列表。
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
public final void addFeature(WebServiceFeature feature) {
if (features == null)
features = new WebServiceFeatureList();
features.add(feature);
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
public static WebServiceFeatureList toList(Iterable<WebServiceFeature> features) {
if (features instanceof WebServiceFeatureList)
return (WebServiceFeatureList) features;
WebServiceFeatureList w = new WebServiceFeatureList();
if (features != null)
w.addAll(features);
return w;
}
代码示例来源:origin: javaee/metro-jax-ws
public void mergeFeatures(WebServiceFeature[] features, boolean reportConflicts) {
for (WebServiceFeature wsdlFtr : features) {
if (get(wsdlFtr.getClass()) == null) {
add(wsdlFtr);
} else if (reportConflicts) {
if (isEnabled(wsdlFtr.getClass()) != wsdlFtr.isEnabled()) {
LOGGER.warning(ModelerMessages.RUNTIME_MODELER_FEATURE_CONFLICT(
get(wsdlFtr.getClass()), wsdlFtr));
}
}
}
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
/**
* Returns a feature list for feature annotations(i.e which have
* {@link javax.xml.ws.spi.WebServiceFeatureAnnotation} meta annotation)
*
* @param ann list of annotations(that can also have non-feature annotations)
* @return non-null feature list object
*/
public static WSFeatureList getWSFeatureList(Iterable<Annotation> ann) {
WebServiceFeatureList list = new WebServiceFeatureList();
list.parseAnnotations(ann);
return list;
}
代码示例来源:origin: org.seedstack.addons.ws/web-services-core
features = bindingID.createBuiltinFeatureList();
if (checkMtomConflict(features.get(MTOMFeature.class), mtomfeature)) {
throw new ServerRtException(ServerMessages.DD_MTOM_CONFLICT(ddBindingId, mtomEnabled));
bindingID = BindingID.parse(implClass);
features = new WebServiceFeatureList();
if (mtomfeature != null) {
features.add(mtomfeature);
features.addAll(bindingID.createBuiltinFeatureList());
features.add(new DatabindingModeFeature(dataBindingMode));
return bindingID.createBinding(features.toArray());
代码示例来源:origin: com.sun.xml.ws/jaxws-tools
bindingID = BindingID.parse(endpointClass);
WebServiceFeatureList wsfeatures = new WebServiceFeatureList(endpointClass);
config.setEndpointClass(endpointClass);
config.getMappingInfo().setServiceName(options.serviceName);
config.setFeatures(wsfeatures.toArray());
config.setClassLoader(classLoader);
config.getMappingInfo().setBindingID(bindingID);
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
public BindingImpl createBinding(WebServiceFeatureList webServiceFeatures, Class<?> portInterface,
BindingImpl existingBinding) {
if (existingBinding != null) {
webServiceFeatures.addAll(existingBinding.getFeatures());
}
Iterable<WebServiceFeature> configFeatures;
//TODO incase of Dispatch, provide a way to User for complete control of the message processing by giving
// ability to turn off the WSDL/Policy based features and its associated tubes.
//Even in case of Dispatch, merge all features configured via WSDL/Policy or deployment configuration
if (portModel != null) {
// could have merged features from this.policyMap, but some features are set in WSDLModel which are not there in PolicyMap
// for ex: <wsaw:UsingAddressing> wsdl extn., and since the policyMap features are merged into WSDLModel anyway during postFinished(),
// So, using here WsdlModel for merging is right.
// merge features from WSDL
configFeatures = portModel.getFeatures();
} else {
configFeatures = PolicyUtil.getPortScopedFeatures(policyMap, owner.getServiceName(),portName);
}
webServiceFeatures.mergeFeatures(configFeatures, false);
// merge features from interceptor
webServiceFeatures.mergeFeatures(owner.serviceInterceptor.preCreateBinding(this, portInterface, webServiceFeatures), false);
BindingImpl bindingImpl = BindingImpl.create(bindingId, webServiceFeatures.toArray());
owner.getHandlerConfigurator().configureHandlers(this,bindingImpl);
return bindingImpl;
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
if (config.getFeatures() != null) wsBinding.getFeatures().mergeFeatures(config.getFeatures(), false);
if (binding != null) wsBinding.getFeatures().mergeFeatures(binding.getFeatures(), false);
this.features = WebServiceFeatureList.toList(wsBinding.getFeatures());
} else {
this.bindingId = config.getMappingInfo().getBindingID();
this.features = WebServiceFeatureList.toList(config.getFeatures());
if (binding != null) bindingId = binding.getBinding().getBindingId();
if (bindingId == null) bindingId = getDefaultBindingID();
if (!features.contains(MTOMFeature.class)) {
MTOM mtomAn = getAnnotation(portClass, MTOM.class);
if (mtomAn != null) features.add(WebServiceFeatureList.getFeature(mtomAn));
if (!features.contains(com.oracle.webservices.api.EnvelopeStyleFeature.class)) {
com.oracle.webservices.api.EnvelopeStyle es = getAnnotation(portClass, com.oracle.webservices.api.EnvelopeStyle.class);
if (es != null) features.add(WebServiceFeatureList.getFeature(es));
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
/**
*
* @param endpointClass web service impl class
*/
public void parseAnnotations(Class<?> endpointClass) {
for (Annotation a : endpointClass.getAnnotations()) {
WebServiceFeature ftr = getFeature(a);
if (ftr != null) {
if (ftr instanceof MTOMFeature) {
// check conflict with @BindingType
BindingID bindingID = BindingID.parse(endpointClass);
MTOMFeature bindingMtomSetting = bindingID.createBuiltinFeatureList().get(MTOMFeature.class);
if (bindingMtomSetting != null && bindingMtomSetting.isEnabled() ^ ftr.isEnabled()) {
throw new RuntimeModelerException(
ModelerMessages.RUNTIME_MODELER_MTOM_CONFLICT(bindingID, ftr.isEnabled()));
}
}
add(ftr);
}
}
}
代码示例来源:origin: com.sun.xml.ws/rt
protected <T> T getPort(WSEndpointReference wsepr, QName portName, Class<T> portInterface,
WebServiceFeatureList features) {
ComponentFeature cf = features.get(ComponentFeature.class);
if (cf != null && !Target.STUB.equals(cf.getTarget())) {
throw new IllegalArgumentException();
}
ComponentsFeature csf = features.get(ComponentsFeature.class);
if (csf != null) {
for (ComponentFeature cfi : csf.getComponentFeatures()) {
if (!Target.STUB.equals(cfi.getTarget()))
throw new IllegalArgumentException();
}
}
features.addAll(this.features);
SEIPortInfo spi = addSEI(portName, portInterface, features);
return createEndpointIFBaseProxy(wsepr,portName,portInterface,features, spi);
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
/**
* Returna a new {@link WebServiceFeatureList} instance
* that represents the features that are built into this binding ID.
*
* <p>
* For example, {@link BindingID} for
* {@code "{@value SOAPBinding#SOAP11HTTP_MTOM_BINDING}"}
* would always return a list that has {@link MTOMFeature} enabled.
*/
public WebServiceFeatureList createBuiltinFeatureList() {
return new WebServiceFeatureList();
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
protected BindingImpl(BindingID bindingId, WebServiceFeature ... features) {
this.bindingId = bindingId;
handlerConfig = new HandlerConfiguration(Collections.<String>emptySet(), Collections.<Handler>emptyList());
if (handlerConfig.getHandlerKnownHeaders() != null)
knownHeaders.addAll(handlerConfig.getHandlerKnownHeaders());
this.features = new WebServiceFeatureList(features);
this.features.validate();
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
public synchronized @NotNull com.oracle.webservices.api.message.MessageContextFactory getMessageContextFactory () {
if (messageContextFactory == null) {
messageContextFactory = MessageContextFactory.createFactory(getFeatures().toArray());
}
return messageContextFactory;
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
/**
* Adds the corresponding features to the list for feature annotations(i.e
* which have {@link WebServiceFeatureAnnotation} meta annotation)
*
* @param annIt collection of annotations(that can have non-feature annotations)
*/
public void parseAnnotations(Iterable<Annotation> annIt) {
for(Annotation ann : annIt) {
WebServiceFeature feature = getFeature(ann);
if (feature != null) {
add(feature);
}
}
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
private MetadataReader getMetadadaReader(WebServiceFeatureList features, ClassLoader classLoader) {
if (features == null) return null;
com.oracle.webservices.api.databinding.ExternalMetadataFeature ef =
features.get(com.oracle.webservices.api.databinding.ExternalMetadataFeature.class);
// TODO-Miran: would it be necessary to disable secure xml processing?
if (ef != null)
return ef.getMetadataReader(classLoader, false);
return null;
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
/**
* Adds features to the list if it's not already added.
*/
public void addAll(@NotNull Iterable<WebServiceFeature> list) {
for (WebServiceFeature f : list)
add(f);
}
代码示例来源:origin: com.sun.xml.ws/rt
/**
* Adds a feature to the list if it's not already added.
*/
public void add(@NotNull WebServiceFeature f) {
if(addNoValidate(f) && isValidating)
validate(f);
}
代码示例来源:origin: com.sun.xml.ws/rt
private BindingID getDefaultBindingID() {
BindingType bt = getAnnotation(portClass, BindingType.class);
if (bt != null) return BindingID.parse(bt.value());
SOAPVersion ver = getSoapVersion(features);
boolean mtomEnabled = features.isEnabled(MTOMFeature.class);
if (SOAPVersion.SOAP_12.equals(ver)) {
return (mtomEnabled) ? BindingID.SOAP12_HTTP_MTOM : BindingID.SOAP12_HTTP;
} else {
return (mtomEnabled) ? BindingID.SOAP11_HTTP_MTOM : BindingID.SOAP11_HTTP;
}
}
代码示例来源:origin: com.sun.xml.ws/rt
StreamSOAPCodec(WSFeatureList features) {
this(getSoapVersion(features), features.get(SerializationFeature.class));
}
代码示例来源:origin: com.sun.xml.ws/jaxws-rt
/**
* Use {@link BindingImpl#create(BindingID)} to create this.
*
* @param bindingId binding id
* @param features
* These features have a precedence over
* {@link BindingID#createBuiltinFeatureList() the implicit features}
* associated with the {@link BindingID}.
*/
SOAPBindingImpl(BindingID bindingId, WebServiceFeature... features) {
super(bindingId, features);
this.soapVersion = bindingId.getSOAPVersion();
//populates with required roles and updates handlerConfig
setRoles(new HashSet<String>());
//Is this still required? comment out for now
//setupSystemHandlerDelegate(serviceName);
this.features.addAll(bindingId.createBuiltinFeatureList());
}
内容来源于网络,如有侵权,请联系作者删除!