gpt4 book ai didi

com.sun.xml.ws.util.xml.XmlUtil.identityTransform()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 20:05:05 25 4
gpt4 key购买 nike

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

XmlUtil.identityTransform介绍

[英]Performs identity transformation.
[中]执行身份转换。

代码示例

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

void addSchema(Source schema) {
  assert schema.getSystemId() != null;
  String systemId = schema.getSystemId();
  try {
    XMLStreamBufferResult xsbr = XmlUtil.identityTransform(schema, new XMLStreamBufferResult());
    SDDocumentSource sds = SDDocumentSource.create(new URL(systemId), xsbr.getXMLStreamBuffer());
    SDDocument sdoc = SDDocumentImpl.create(sds, new QName(""), new QName(""));
    docs.put(systemId, sdoc);
    nsMapping.put(((SDDocument.Schema)sdoc).getTargetNamespace(), sdoc);
  } catch(Exception ex) {
    LOGGER.log(Level.WARNING, "Exception in adding schemas to resolver", ex);
  }
}

代码示例来源:origin: com.sun.xml.ws/rt

void addSchema(Source schema) {
  assert schema.getSystemId() != null;
  String systemId = schema.getSystemId();
  try {
    XMLStreamBufferResult xsbr = XmlUtil.identityTransform(schema, new XMLStreamBufferResult());
    SDDocumentSource sds = SDDocumentSource.create(new URL(systemId), xsbr.getXMLStreamBuffer());
    SDDocument sdoc = SDDocumentImpl.create(sds, new QName(""), new QName(""));
    docs.put(systemId, sdoc);
    nsMapping.put(((SDDocument.Schema)sdoc).getTargetNamespace(), sdoc);
  } catch(Exception ex) {
    LOGGER.log(Level.WARNING, "Exception in adding schemas to resolver", ex);
  }
}

代码示例来源:origin: javaee/metro-jax-ws

void addSchema(Source schema) {
  assert schema.getSystemId() != null;
  String systemId = schema.getSystemId();
  try {
    XMLStreamBufferResult xsbr = XmlUtil.identityTransform(schema, new XMLStreamBufferResult());
    SDDocumentSource sds = SDDocumentSource.create(new URL(systemId), xsbr.getXMLStreamBuffer());
    SDDocument sdoc = SDDocumentImpl.create(sds, new QName(""), new QName(""));
    docs.put(systemId, sdoc);
    nsMapping.put(((SDDocument.Schema)sdoc).getTargetNamespace(), sdoc);
  } catch(Exception ex) {
    LOGGER.log(Level.WARNING, "Exception in adding schemas to resolver", ex);
  }
}

代码示例来源:origin: com.sun.xml.ws/jaxws-rt

/**
 * Convert metadata sources using identity transform. So that we can
 * reuse the Source object multiple times.
 */
private List<SDDocumentSource> buildDocList() {
  List<SDDocumentSource> r = new ArrayList<>();
  if (metadata != null) {
    for (Source source : metadata) {
      try {
        XMLStreamBufferResult xsbr = XmlUtil.identityTransform(source, new XMLStreamBufferResult());
        String systemId = source.getSystemId();
        r.add(SDDocumentSource.create(new URL(systemId), xsbr.getXMLStreamBuffer()));
      } catch (TransformerException | IOException | SAXException | ParserConfigurationException te) {
        throw new ServerRtException("server.rt.err", te);
      }
    }
  }
  return r;
}

代码示例来源:origin: com.sun.xml.ws/rt

/**
 * Convert metadata sources using identity transform. So that we can
 * reuse the Source object multiple times.
 */
private List<SDDocumentSource> buildDocList() {
  List<SDDocumentSource> r = new ArrayList<>();
  if (metadata != null) {
    for (Source source : metadata) {
      try {
        XMLStreamBufferResult xsbr = XmlUtil.identityTransform(source, new XMLStreamBufferResult());
        String systemId = source.getSystemId();
        r.add(SDDocumentSource.create(new URL(systemId), xsbr.getXMLStreamBuffer()));
      } catch (TransformerException | IOException | SAXException | ParserConfigurationException te) {
        throw new ServerRtException("server.rt.err", te);
      }
    }
  }
  return r;
}

代码示例来源:origin: javaee/metro-jax-ws

/**
 * Convert metadata sources using identity transform. So that we can
 * reuse the Source object multiple times.
 */
private List<SDDocumentSource> buildDocList() {
  List<SDDocumentSource> r = new ArrayList<>();
  if (metadata != null) {
    for (Source source : metadata) {
      try {
        XMLStreamBufferResult xsbr = XmlUtil.identityTransform(source, new XMLStreamBufferResult());
        String systemId = source.getSystemId();
        r.add(SDDocumentSource.create(new URL(systemId), xsbr.getXMLStreamBuffer()));
      } catch (TransformerException | IOException | SAXException | ParserConfigurationException te) {
        throw new ServerRtException("server.rt.err", te);
      }
    }
  }
  return r;
}

代码示例来源:origin: javaee/grizzly

/**
   * Convert metadata sources using identity transform. So that we can
   * reuse the Source object multiple times.
   */
  private List<SDDocumentSource> buildDocList() {
    List<SDDocumentSource> r = new ArrayList<SDDocumentSource>();

    if (metadata != null) {
      for (Source source : metadata) {
        try {
          XMLStreamBufferResult xsbr = XmlUtil.identityTransform(source, new XMLStreamBufferResult());
          String systemId = source.getSystemId();

          r.add(SDDocumentSource.create(new URL(systemId), xsbr.getXMLStreamBuffer()));
        } catch (TransformerException te) {
          throw new ServerRtException("server.rt.err", te);
        } catch (IOException te) {
          throw new ServerRtException("server.rt.err", te);
        } catch (SAXException e) {
          throw new ServerRtException("server.rt.err", e);
        } catch (ParserConfigurationException e) {
          throw new ServerRtException("server.rt.err", e);
        }
      }
    }

    return r;
  }    
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com