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


Java TWSDLParserContextImpl类代码示例

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


TWSDLParserContextImpl类属于com.sun.tools.internal.ws.wsdl.framework包,在下文中一共展示了TWSDLParserContextImpl类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildWSDLDocument

import com.sun.tools.internal.ws.wsdl.framework.TWSDLParserContextImpl; //导入依赖的package包/类
private WSDLDocument buildWSDLDocument(){
    /**
     * Currently we are working off first WSDL document
     * TODO: add support of creating WSDLDocument from fromjava.collection of WSDL documents
     */

    String location = forest.getRootWSDL();

    //It means that WSDL is not found, an error might have been reported, lets try to recover
    if(location == null)
        return null;

    Document root = forest.get(location);

    if(root == null)
        return null;

    WSDLDocument document = new WSDLDocument(forest, errReceiver);
    document.setSystemId(location);
    TWSDLParserContextImpl context = new TWSDLParserContextImpl(forest, document, listeners, errReceiver);

    Definitions definitions = parseDefinitions(context, root);
    document.setDefinitions(definitions);
    return document;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:26,代码来源:WSDLParser.java

示例2: parseDefinitions

import com.sun.tools.internal.ws.wsdl.framework.TWSDLParserContextImpl; //导入依赖的package包/类
private Definitions parseDefinitions(TWSDLParserContextImpl context, Document root) {
    context.pushWSDLLocation();
    context.setWSDLLocation(context.getDocument().getSystemId());

    new Internalizer(forest, options, errReceiver).transform();

    Definitions definitions = parseDefinitionsNoImport(context, root);
    if(definitions == null){
        Locator locator = forest.locatorTable.getStartLocation(root.getDocumentElement());
        errReceiver.error(locator, WsdlMessages.PARSING_NOT_AWSDL(locator.getSystemId()));

    }
    processImports(context);
    context.popWSDLLocation();
    return definitions;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:17,代码来源:WSDLParser.java

示例3: parseDefinitions

import com.sun.tools.internal.ws.wsdl.framework.TWSDLParserContextImpl; //导入依赖的package包/类
private Definitions parseDefinitions(TWSDLParserContextImpl context, Document root) {
        context.pushWSDLLocation();
        context.setWSDLLocation(context.getDocument().getSystemId());

        new Internalizer(forest, options, errReceiver).transform();

        //print the wsdl
//        try{
//            forest.dump(System.out);
//        }catch(IOException e){
//            e.printStackTrace();
//        }

        Definitions definitions = parseDefinitionsNoImport(context, root);
        if(definitions == null){
            Locator locator = forest.locatorTable.getStartLocation(root.getDocumentElement());
            errReceiver.error(locator, WsdlMessages.PARSING_NOT_AWSDL(locator.getSystemId()));

        }
        processImports(context);
        context.popWSDLLocation();
        return definitions;
    }
 
开发者ID:alexkasko,项目名称:openjdk-icedtea7,代码行数:24,代码来源:WSDLParser.java

示例4: processImports

import com.sun.tools.internal.ws.wsdl.framework.TWSDLParserContextImpl; //导入依赖的package包/类
private void processImports(TWSDLParserContextImpl context) {
    for(String location : forest.getExternalReferences()){
        if (!context.getDocument().isImportedDocument(location)){
            Document doc = forest.get(location);
            if(doc == null)
                continue;
            Definitions importedDefinitions = parseDefinitionsNoImport(context, doc);
            if(importedDefinitions == null)
                continue;
            context.getDocument().addImportedEntity(importedDefinitions);
            context.getDocument().addImportedDocument(location);
        }
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:WSDLParser.java

示例5: parseMessagePart

import com.sun.tools.internal.ws.wsdl.framework.TWSDLParserContextImpl; //导入依赖的package包/类
private MessagePart parseMessagePart(TWSDLParserContextImpl context, Element e) {
    context.push();
    context.registerNamespaces(e);
    MessagePart part = new MessagePart(forest.locatorTable.getStartLocation(e));
    String partName = Util.getRequiredAttribute(e, Constants.ATTR_NAME);
    part.setName(partName);

    String elementAttr =
        XmlUtil.getAttributeOrNull(e, Constants.ATTR_ELEMENT);
    String typeAttr = XmlUtil.getAttributeOrNull(e, Constants.ATTR_TYPE);

    if (elementAttr != null) {
        if (typeAttr != null) {
            errReceiver.error(context.getLocation(e), WsdlMessages.PARSING_ONLY_ONE_OF_ELEMENT_OR_TYPE_REQUIRED(partName));

        }

        part.setDescriptor(context.translateQualifiedName(context.getLocation(e), elementAttr));
        part.setDescriptorKind(SchemaKinds.XSD_ELEMENT);
    } else if (typeAttr != null) {
        part.setDescriptor(context.translateQualifiedName(context.getLocation(e), typeAttr));
        part.setDescriptorKind(SchemaKinds.XSD_TYPE);
    } else {
        // XXX-NOTE - this is wrong; for extensibility purposes,
        // any attribute can be specified on a <part> element, so
        // we need to put an extensibility hook here
        errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_ELEMENT_OR_TYPE_REQUIRED(partName));
    }

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

示例6: parseImport

import com.sun.tools.internal.ws.wsdl.framework.TWSDLParserContextImpl; //导入依赖的package包/类
private Import parseImport(
    TWSDLParserContextImpl context,
    Definitions definitions,
    Element e) {
    context.push();
    context.registerNamespaces(e);
    Import anImport = new Import(forest.locatorTable.getStartLocation(e));
    String namespace =
        Util.getRequiredAttribute(e, Constants.ATTR_NAMESPACE);
    anImport.setNamespace(namespace);
    String location = Util.getRequiredAttribute(e, Constants.ATTR_LOCATION);
    anImport.setLocation(location);

    // according to the schema in the WSDL 1.1 spec, an import can have a documentation element
    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;
            anImport.setDocumentation(getDocumentationFor(e2));
        } else {
            errReceiver.error(forest.locatorTable.getStartLocation(e2), WsdlMessages.PARSING_INVALID_ELEMENT(e2.getTagName(),
                e2.getNamespaceURI()));
        }
    }
    context.pop();
    context.fireDoneParsingEntity(WSDLConstants.QNAME_IMPORT, anImport);
    return anImport;
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:37,代码来源:WSDLParser.java

示例7: handleExtension

import com.sun.tools.internal.ws.wsdl.framework.TWSDLParserContextImpl; //导入依赖的package包/类
private boolean handleExtension(
    TWSDLParserContextImpl context,
    TWSDLExtensible entity,
    Element e) {
    TWSDLExtensionHandler h =
         (TWSDLExtensionHandler) extensionHandlers.get(e.getNamespaceURI());
    if (h == null) {
        context.fireIgnoringExtension(e, (Entity) entity);
        errReceiver.warning(forest.locatorTable.getStartLocation(e), WsdlMessages.PARSING_UNKNOWN_EXTENSIBILITY_ELEMENT_OR_ATTRIBUTE(e.getLocalName(), e.getNamespaceURI()));
        return false;
    } else {
        return h.doHandleExtension(context, entity, e);
    }
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:15,代码来源:WSDLParser.java


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