org.apache.axis2.deployment.util.Utils.toFile()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(80)

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

Utils.toFile介绍

暂无

代码示例

代码示例来源:origin: org.apache.axis2/axis2-kernel

/**
 * To get the location of the Axis2.jar from that I can drive the location of class path
 *
 * @return String (location of the axis2 jar)
 */
protected String getLocation() {
  try {
    Class clazz = Loader.loadClass("org.apache.axis2.engine.AxisEngine");
    java.net.URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
    String location = url.toString();
    if (location.startsWith("jar")) {
      url = ((java.net.JarURLConnection)url.openConnection()).getJarFileURL();
      location = url.toString();
    }
    if (location.startsWith("file")) {
      File file = Utils.toFile(url);
      return file.getAbsolutePath();
    } else {
      return url.toString();
    }
  } catch (Throwable t) {
    return null;
  }
}

代码示例来源:origin: apache/axis2-java

/**
 * To get the location of the Axis2.jar from that I can drive the location of class path
 *
 * @return String (location of the axis2 jar)
 */
protected String getLocation() {
  try {
    Class clazz = Loader.loadClass("org.apache.axis2.engine.AxisEngine");
    java.net.URL url = clazz.getProtectionDomain().getCodeSource().getLocation();
    String location = url.toString();
    if (location.startsWith("jar")) {
      url = ((java.net.JarURLConnection)url.openConnection()).getJarFileURL();
      location = url.toString();
    }
    if (location.startsWith("file")) {
      File file = Utils.toFile(url);
      return file.getAbsolutePath();
    } else {
      return url.toString();
    }
  } catch (Throwable t) {
    return null;
  }
}

代码示例来源:origin: org.apache.axis2/axis2-metadata

classpath.add(Utils.toFile(url).getCanonicalPath());

代码示例来源:origin: apache/axis2-java

classpath.add(Utils.toFile(url).getCanonicalPath());

代码示例来源:origin: org.apache.axis2/axis2-kernel

WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(
    wsdlStream, null, null);
File file = Utils.toFile(servicesURL);
if (file != null && file.exists()) {
  wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator(
  WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(
      wsdlStream, axisService);
  File file = Utils.toFile(servicesURL);
  if (file != null && file.exists()) {
    wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator(

代码示例来源:origin: apache/axis2-java

WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(
    wsdlStream, null, null);
File file = Utils.toFile(servicesURL);
if (file != null && file.exists()) {
  wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator(
  WSDL11ToAxisServiceBuilder wsdl2AxisServiceBuilder = new WSDL11ToAxisServiceBuilder(
      wsdlStream, axisService);
  File file = Utils.toFile(servicesURL);
  if (file != null && file.exists()) {
    wsdl2AxisServiceBuilder.setCustomWSDLResolver(new AARBasedWSDLLocator(

相关文章