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


Java Binding.setName方法代码示例

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


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

示例1: parseBinding

import com.sun.tools.internal.ws.wsdl.document.Binding; //导入方法依赖的package包/类
private Binding parseBinding(
    TWSDLParserContextImpl context,
    Definitions definitions,
    Element e) {
    context.push();
    context.registerNamespaces(e);
    Binding binding = new Binding(definitions, forest.locatorTable.getStartLocation(e), errReceiver);
    String name = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
    binding.setName(name);
    String typeAttr = Util.getRequiredAttribute(e, Constants.ATTR_TYPE);
    binding.setPortType(context.translateQualifiedName(context.getLocation(e), typeAttr));

    boolean gotDocumentation = false;

    for (Iterator iter = XmlUtil.getAllChildren(e); iter.hasNext();) {
        Element e2 = Util.nextElement(iter);
        if (e2 == null)
            break;

        if (XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_DOCUMENTATION)) {
            if (gotDocumentation) {
                errReceiver.error(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ONLY_ONE_DOCUMENTATION_ALLOWED(e.getLocalName()));
            }
            gotDocumentation = true;
            binding.setDocumentation(getDocumentationFor(e2));
        } else if (
            XmlUtil.matchesTagNS(e2, WSDLConstants.QNAME_OPERATION)) {
            BindingOperation op = parseBindingOperation(context, e2);
            binding.add(op);
        } else {
            // possible extensibility element -- must live outside the WSDL namespace
            checkNotWsdlElement(e2);
            if (!handleExtension(context, binding, e2)) {
                checkNotWsdlRequired(e2);
            }
        }
    }

    context.pop();
    context.fireDoneParsingEntity(WSDLConstants.QNAME_BINDING, binding);
    return binding;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:43,代码来源:WSDLParser.java


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