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


Java WebServiceFeature.isEnabled方法代码示例

本文整理汇总了Java中javax.xml.ws.WebServiceFeature.isEnabled方法的典型用法代码示例。如果您正苦于以下问题:Java WebServiceFeature.isEnabled方法的具体用法?Java WebServiceFeature.isEnabled怎么用?Java WebServiceFeature.isEnabled使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在javax.xml.ws.WebServiceFeature的用法示例。


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

示例1: parseAnnotations

import javax.xml.ws.WebServiceFeature; //导入方法依赖的package包/类
/**
 *
 * @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);
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:22,代码来源:WebServiceFeatureList.java

示例2: mergeFeatures

import javax.xml.ws.WebServiceFeature; //导入方法依赖的package包/类
/**
 * Merges the extra features that are not already set on binding.
 * i.e, if a feature is set already on binding through some other API
 * the corresponding wsdlFeature is not set.
 *
 * @param features          Web Service features that need to be merged with already configured features.
 * @param reportConflicts   If true, checks if the feature setting in WSDL (wsdl extension or
 *                          policy configuration) conflicts with feature setting in Deployed Service and
 *                          logs warning if there are any conflicts.
 */
public void mergeFeatures(@NotNull Iterable<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));
            }
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:23,代码来源:WebServiceFeatureList.java

示例3: isEnabled

import javax.xml.ws.WebServiceFeature; //导入方法依赖的package包/类
public boolean isEnabled(@NotNull Class<? extends WebServiceFeature> feature) {
    WebServiceFeature ftr = get(feature);
    return ftr != null && ftr.isEnabled();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:WebServiceFeatureList.java

示例4: isFeatureEnabled

import javax.xml.ws.WebServiceFeature; //导入方法依赖的package包/类
static public boolean isFeatureEnabled(Class<? extends WebServiceFeature> type, WebServiceFeature[] features) {
    WebServiceFeature ftr = getFeature(features, type);
    return ftr != null && ftr.isEnabled();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:5,代码来源:WebServiceFeatureList.java

示例5: isFeatureEnabled

import javax.xml.ws.WebServiceFeature; //导入方法依赖的package包/类
public static boolean isFeatureEnabled(@NotNull Class<? extends WebServiceFeature> featureType,
        @Nullable WebServiceFeatureList list1, @Nullable WebServiceFeatureList list2)
        throws WebServiceException {
    final WebServiceFeature mergedFeature = mergeFeature(featureType, list1, list2);
    return (mergedFeature != null) && mergedFeature.isEnabled();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:7,代码来源:FeatureListUtil.java

示例6: SOAPBindingCodec

import javax.xml.ws.WebServiceFeature; //导入方法依赖的package包/类
public SOAPBindingCodec(WSFeatureList features, StreamSOAPCodec xmlSoapCodec) {
    super(getSoapVersion(features), features);

    this.xmlSoapCodec = xmlSoapCodec;
    xmlMimeType = xmlSoapCodec.getMimeType();

    xmlMtomCodec = new MtomCodec(version, xmlSoapCodec, features);

    xmlSwaCodec = new SwACodec(version, features, xmlSoapCodec);

    String clientAcceptedContentTypes = xmlSoapCodec.getMimeType() + ", " +
            xmlMtomCodec.getMimeType();

    WebServiceFeature fi = features.get(FastInfosetFeature.class);
    isFastInfosetDisabled = (fi != null && !fi.isEnabled());
    if (!isFastInfosetDisabled) {
        fiSoapCodec = getFICodec(xmlSoapCodec, version);
        if (fiSoapCodec != null) {
            fiMimeType = fiSoapCodec.getMimeType();
            fiSwaCodec = new SwACodec(version, features, fiSoapCodec);
            connegXmlAccept = fiMimeType + ", " + clientAcceptedContentTypes;

            /**
             * This feature will only be present on the client side.
             *
             * Fast Infoset is enabled on the client if the service
             * explicitly supports Fast Infoset.
             */
            WebServiceFeature select = features.get(SelectOptimalEncodingFeature.class);
            if (select != null) { // if the client FI feature is set - ignore negotiation property
                ignoreContentNegotiationProperty = true;
                if (select.isEnabled()) {
                    // If the client's FI encoding feature is enabled, and server's is not disabled
                    if (fi != null) {  // if server's FI feature also enabled
                        useFastInfosetForEncoding = true;
                    }

                    clientAcceptedContentTypes = connegXmlAccept;
                } else {  // If client FI feature is disabled
                    isFastInfosetDisabled = true;
                }
            }
        } else {
            // Fast Infoset could not be loaded by the runtime
            isFastInfosetDisabled = true;
            fiSwaCodec = null;
            fiMimeType = "";
            connegXmlAccept = clientAcceptedContentTypes;
            ignoreContentNegotiationProperty = true;
        }
    } else {
        // Fast Infoset is explicitly not supported by the service
        fiSoapCodec = fiSwaCodec = null;
        fiMimeType = "";
        connegXmlAccept = clientAcceptedContentTypes;
        ignoreContentNegotiationProperty = true;
    }

    xmlAccept = clientAcceptedContentTypes;

    if(getSoapVersion(features) == null)
        throw new WebServiceException("Expecting a SOAP binding but found ");
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:64,代码来源:SOAPBindingCodec.java


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