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


Java AddressingFeature.isRequired方法代码示例

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


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

示例1: start

import javax.xml.ws.soap.AddressingFeature; //导入方法依赖的package包/类
@Override
public void start(WSDLGenExtnContext ctxt) {
    WSBinding binding = ctxt.getBinding();
    TypedXmlWriter root = ctxt.getRoot();
    enabled = binding.isFeatureEnabled(AddressingFeature.class);
    if (!enabled)
        return;
    AddressingFeature ftr = binding.getFeature(AddressingFeature.class);
    required = ftr.isRequired();
    root._namespace(AddressingVersion.W3C.wsdlNsUri, AddressingVersion.W3C.getWsdlPrefix());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:12,代码来源:W3CAddressingWSDLGeneratorExtension.java

示例2: publish

import javax.xml.ws.soap.AddressingFeature; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
public synchronized Endpoint publish(ServiceDomain domain, final SOAPBindingModel config, final String bindingId, final InboundHandler handler, WebServiceFeature... features) {
    JBossWSEndpoint wsEndpoint = null;
    try {
        initialize(config);
        Map<String,String> map = new HashMap<String, String>();
        map.put("/" + config.getPort().getServiceName(), SEI);
        Boolean addressingEnabled = false;
        Boolean addressingRequired = false;
        Boolean mtomEnabled = false;
        Integer mtomThreshold = -1;
        for (WebServiceFeature feature : features) {
            if (feature instanceof AddressingFeature) {
                AddressingFeature addrFeature = (AddressingFeature)feature;
                addressingEnabled = addrFeature.isEnabled();
                addressingRequired = addrFeature.isRequired();
                LOGGER.info("Addressing [enabled = " + addrFeature.isEnabled() + ", required = " + addrFeature.isRequired() + "]");
            } else if (feature instanceof MTOMFeature) {
                MTOMFeature mtom = (MTOMFeature)feature;
                mtomEnabled = mtom.isEnabled();
                mtomThreshold = mtom.getThreshold();
                LOGGER.info("MTOM [enabled = " + mtom.isEnabled() + ", threshold = " + mtom.getThreshold() + "]");
            }
        }
        PortComponentMetaData portComponent = new PortComponentMetaData(config.getServiceName()
                                            + ":" + config.getPort().getServiceQName().getLocalPart()
                                            + ":" + config.getPort().getPortQName().getLocalPart(),
                                            config.getPort().getPortQName(),
                                            SEI, null, config.getPort().getServiceQName().getLocalPart(),
                                            null, "/" + config.getPort().getServiceName(),
                                            addressingEnabled, addressingRequired, "ALL", mtomEnabled, mtomThreshold,
                                            false, config.getPort().getServiceQName(), null, null);
        WebserviceDescriptionMetaData wsDescMetaData = new WebserviceDescriptionMetaData(config.getServiceName().getLocalPart(), getWsdlLocation(), null, new PortComponentMetaData[]{portComponent});
        WebservicesMetaData wsMetadata = new WebservicesMetaData(null, new WebserviceDescriptionMetaData[]{wsDescMetaData});

        wsEndpoint = new JBossWSEndpoint();
        if (config.getContextPath() != null) {
            wsEndpoint.publish(domain, getContextRoot(), map, wsMetadata, config, handler);
        } else {
            wsEndpoint.publish(domain, getContextPath(), map, wsMetadata, config, handler);
        }
    } catch (Exception e) {
        throw new WebServicePublishException(e);
    }
    return wsEndpoint;
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:49,代码来源:JBossWSEndpointPublisher.java

示例3: publish

import javax.xml.ws.soap.AddressingFeature; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
public synchronized Endpoint publish(ServiceDomain domain, final SOAPBindingModel config, final String bindingId, final InboundHandler handler, WebServiceFeature... features) {
    JBossWSEndpoint wsEndpoint = null;
    try {
        initialize(config);
        Map<String,String> map = new HashMap<String, String>();
        map.put("/" + config.getPort().getServiceName(), SEI);

        Boolean addressingEnabled = false;
        Boolean addressingRequired = false;
        Boolean mtomEnabled = false;
        Integer mtomThreshold = -1;

        for (WebServiceFeature feature : features) {
            if (feature instanceof AddressingFeature) {
                AddressingFeature addrFeature = (AddressingFeature)feature;
                addressingEnabled = addrFeature.isEnabled();
                addressingRequired = addrFeature.isRequired();
                LOGGER.info("Addressing [enabled = " + addressingEnabled + ", required = " + addressingRequired + "]");
            } else if (feature instanceof MTOMFeature) {
                MTOMFeature mtom = (MTOMFeature)feature;
                mtomEnabled = mtom.isEnabled();
                mtomThreshold = mtom.getThreshold();
                LOGGER.info("MTOM [enabled = " + mtomEnabled + ", threshold = " + mtomThreshold + "]");
            }
        }
        PortComponentMetaData portComponent = new PortComponentMetaData(config.getServiceName()
                + ":" + config.getPort().getServiceQName().getLocalPart()
                + ":" + config.getPort().getPortQName().getLocalPart(),
                config.getPort().getPortQName(),
                SEI, null, config.getPort().getServiceQName().getLocalPart(),
                null, "/" + config.getPort().getServiceName(),
                addressingEnabled, addressingRequired, "ALL", mtomEnabled, mtomThreshold,
                false, config.getPort().getServiceQName(), null, null);
        WebserviceDescriptionMetaData wsDescMetaData = new WebserviceDescriptionMetaData(config.getServiceName().getLocalPart(), getWsdlLocation(), null, new PortComponentMetaData[]{portComponent});
        WebservicesMetaData wsMetadata = new WebservicesMetaData(null, new WebserviceDescriptionMetaData[]{wsDescMetaData});

        wsEndpoint = new JBossWSEndpoint();
        if (config.getContextPath() != null) {
            wsEndpoint.publish(domain, getContextRoot(), map, wsMetadata, config, handler);
        } else {
            wsEndpoint.publish(domain, getContextPath(), map, wsMetadata, config, handler);
        }
    } catch (Exception e) {
        throw new WebServicePublishException(e);
    }
    return wsEndpoint;
}
 
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:51,代码来源:JBossWSEndpointPublisher.java


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