本文整理汇总了Java中com.sun.tools.internal.ws.wsdl.document.Import.setDocumentation方法的典型用法代码示例。如果您正苦于以下问题:Java Import.setDocumentation方法的具体用法?Java Import.setDocumentation怎么用?Java Import.setDocumentation使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.tools.internal.ws.wsdl.document.Import
的用法示例。
在下文中一共展示了Import.setDocumentation方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parseImport
import com.sun.tools.internal.ws.wsdl.document.Import; //导入方法依赖的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;
}