gpt4 book ai didi

org.apache.tuscany.sca.common.xml.XMLDocumentHelper类的使用及代码示例

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

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

XMLDocumentHelper介绍

暂无

代码示例

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

public InputSource run() throws IOException {                                    
    return XMLDocumentHelper.getInputSource(url);
  }
});

代码示例来源:origin: org.apache.tuscany.sca/tuscany-common-xml

/**
 * Detect the XML encoding of the document
 * 
 * @param is The input stream
 * @return The encoding
 * @throws IOException
 */
public static String getEncoding(InputStream is) throws IOException {
  if (!is.markSupported())
    is = new BufferedInputStream(is);
  byte[] buffer = readBuffer(is);
  return getXMLEncoding(buffer);
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-common-xml

public static InputSource getInputSource(URL url) throws IOException {
  InputStream is = openStream(url);
  return getInputSource(url, is);
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-xsd

public InputSource run() throws IOException {                                    
    return XMLDocumentHelper.getInputSource(url);
  }
});

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

public static InputSource getInputSource(URL url) throws IOException {
  InputStream is = openStream(url);
  return getInputSource(url, is);
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

/**
 * Detect the XML encoding of the document
 * 
 * @param is The input stream
 * @return The encoding
 * @throws IOException
 */
public static String getEncoding(InputStream is) throws IOException {
  if (!is.markSupported())
    is = new BufferedInputStream(is);
  byte[] buffer = readBuffer(is);
  return getXMLEncoding(buffer);
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

public InputSource getBaseInputSource() {
  try {
    return XMLDocumentHelper.getInputSource(base, inputStream);
  } catch (IOException e) {
    throw new IllegalArgumentException(e);
  }
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl

public InputSource getBaseInputSource() {
  try {
    return XMLDocumentHelper.getInputSource(base, inputStream);
  } catch (IOException e) {
    throw new IllegalArgumentException(e);
  }
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

public InputSource run() throws IOException {
    return XMLDocumentHelper.getInputSource(finaldef.getLocation().toURL());
  }
});

代码示例来源:origin: org.apache.tuscany.sca/tuscany-xsd

public InputSource run() throws IOException {
    return XMLDocumentHelper.getInputSource(finaldef.getLocation().toURL());
  }
});

代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2

public org.xml.sax.InputSource resolveEntity(java.lang.String targetNamespace,
                         java.lang.String schemaLocation,
                         java.lang.String baseUri) {
    try {
      if (baseUri == null) {
        baseUri = definition.getDocumentBaseURI();
      }
      URL url = new URL(new URL(baseUri), schemaLocation);
      return XMLDocumentHelper.getInputSource(url); 
    } catch (IOException e) {
      return null;
    }
  }
}

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

private Collection<? extends Source> aggregate(URL... urls) throws IOException, XMLStreamException {
  if (urls.length == 1) {
    return Collections.singletonList(new SAXSource(XMLDocumentHelper.getInputSource(urls[0])));
  for (Map.Entry<String, Collection<URL>> e : map.entrySet()) {
    if (e.getValue().size() == 1) {
      sources.add(new SAXSource(XMLDocumentHelper.getInputSource(e.getValue().iterator().next())));
    } else {
      StringBuffer xsd = new StringBuffer("<schema xmlns=\"http://www.w3.org/2001/XMLSchema\"");

代码示例来源:origin: org.apache.tuscany.sca/tuscany-contribution

private Collection<? extends Source> aggregate(URL... urls) throws IOException, XMLStreamException {
  if (urls.length == 1) {
    return Collections.singletonList(new SAXSource(XMLDocumentHelper.getInputSource(urls[0])));
  for (Map.Entry<String, Collection<URL>> e : map.entrySet()) {
    if (e.getValue().size() == 1) {
      sources.add(new SAXSource(XMLDocumentHelper.getInputSource(e.getValue().iterator().next())));
    } else {
      StringBuffer xsd = new StringBuffer("<schema xmlns=\"http://www.w3.org/2001/XMLSchema\"");

代码示例来源:origin: org.apache.tuscany.sca/tuscany-interface-wsdl

return XMLDocumentHelper.getInputSource(url); 
} catch (IOException e) {            	
            if (entry.getKey().equals(namespace)) {
              URL url = ((WSDLDefinitionImpl)artifact.getModel()).getLocation().toURL();                                    
              return XMLDocumentHelper.getInputSource(url);

代码示例来源:origin: org.apache.tuscany.sca/tuscany-base-runtime

return XMLDocumentHelper.getInputSource(url); 
} catch (IOException e) {            	
            if (entry.getKey().equals(namespace)) {
              URL url = ((WSDLDefinitionImpl)artifact.getModel()).getLocation().toURL();                                    
              return XMLDocumentHelper.getInputSource(url);

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