javax.wsdl.extensions.schema.Schema.getElementType()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.3k)|赞(0)|评价(0)|浏览(140)

本文整理了Java中javax.wsdl.extensions.schema.Schema.getElementType()方法的一些代码示例,展示了Schema.getElementType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Schema.getElementType()方法的具体详情如下:
包路径:javax.wsdl.extensions.schema.Schema
类名称:Schema
方法名:getElementType

Schema.getElementType介绍

暂无

代码示例

代码示例来源:origin: apache/cxf

private void fixSchema(Schema sc, String pfx) throws ParserConfigurationException {
  Document doc = DOMUtils.getEmptyDocument();
  Element el = doc.createElementNS(sc.getElementType().getNamespaceURI(),
            pfx + ":" + sc.getElementType().getLocalPart());
  sc.setElement(el);
  Map<String, List<String>> mp = CastUtils.cast(sc.getImports());
  for (Map.Entry<String, List<String>> ent : mp.entrySet()) {
    Element imp = doc.createElementNS(sc.getElementType().getNamespaceURI(),
                     pfx + ":import");
    el.appendChild(imp);
    imp.setAttribute("namespace", ent.getKey());
  }
}

代码示例来源:origin: org.apache.geronimo.modules/geronimo-webservices-builder

if (o instanceof Schema) {
  Schema unknownExtensibilityElement = (Schema) o;
  QName elementType = unknownExtensibilityElement.getElementType();
  if (new QName("http://www.w3.org/2001/XMLSchema", "schema").equals(elementType)) {
    Element element = unknownExtensibilityElement.getElement();

代码示例来源:origin: org.apache.openejb/openejb-axis

if (extensibilityElement instanceof Schema) {
  final Schema unknownExtensibilityElement = (Schema) extensibilityElement;
  final QName elementType = unknownExtensibilityElement.getElementType();
  if (new QName("http://www.w3.org/2001/XMLSchema", "schema").equals(elementType)) {
    final Element element = unknownExtensibilityElement.getElement();

代码示例来源:origin: apache/cxf

private void fixTypes(Definition wsdlDef) throws ParserConfigurationException {
  Types t = wsdlDef.getTypes();
  if (t == null) {
    return;
  }
  List<ExtensibilityElement> l = CastUtils.cast(t.getExtensibilityElements());
  if (l == null) {
    return;
  }
  for (ExtensibilityElement e : l) {
    if (e instanceof Schema) {
      Schema sc = (Schema)e;
      String pfx = wsdlDef.getPrefix(sc.getElementType().getNamespaceURI());
      if (StringUtils.isEmpty(pfx)) {
        pfx = "xsd";
        String ns = wsdlDef.getNamespace(pfx);
        int count = 1;
        while (!StringUtils.isEmpty(ns)) {
          pfx = "xsd" + count++;
          ns = wsdlDef.getNamespace(pfx);
        }
        wsdlDef.addNamespace(pfx, sc.getElementType().getNamespaceURI());
      }
      if (sc.getElement() == null) {
        fixSchema(sc, pfx);
      }
    }
  }
}

相关文章