本文整理了Java中org.apache.axis2.deployment.util.Utils.createClassLoader()
方法的一些代码示例,展示了Utils.createClassLoader()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.createClassLoader()
方法的具体详情如下:
包路径:org.apache.axis2.deployment.util.Utils
类名称:Utils
方法名:createClassLoader
暂无
代码示例来源:origin: org.apache.axis2/axis2-kernel
public void setClassLoader(boolean isDirectory, ClassLoader parent, File file, boolean isChildFirstClassLoading) throws AxisFault {
if (!isDirectory) {
if (this.file != null) {
URL[] urlsToLoadFrom;
try {
if (!this.file.exists()) {
throw new AxisFault(Messages.getMessage(DeploymentErrorMsgs.FILE_NOT_FOUND,
this.file.getAbsolutePath()));
}
urlsToLoadFrom = new URL[]{this.file.toURI().toURL()};
classLoader = Utils.createClassLoader(urlsToLoadFrom, parent, true, file, isChildFirstClassLoading);
} catch (Exception e) {
throw AxisFault.makeFault(e);
}
}
} else {
if (this.file != null) {
classLoader = Utils.getClassLoader(parent, this.file, isChildFirstClassLoading);
}
}
}
代码示例来源:origin: apache/axis2-java
public void setClassLoader(boolean isDirectory, ClassLoader parent, File file, boolean isChildFirstClassLoading) throws AxisFault {
if (!isDirectory) {
if (this.file != null) {
URL[] urlsToLoadFrom;
try {
if (!this.file.exists()) {
throw new AxisFault(Messages.getMessage(DeploymentErrorMsgs.FILE_NOT_FOUND,
this.file.getAbsolutePath()));
}
classLoader = Utils.createClassLoader(this.file.toURI().toURL(), null, parent, file, isChildFirstClassLoading);
} catch (Exception e) {
throw AxisFault.makeFault(e);
}
}
} else {
if (this.file != null) {
classLoader = Utils.getClassLoader(parent, this.file, isChildFirstClassLoading);
}
}
}
代码示例来源:origin: org.bluestemsoftware.open.eoa.ext/ext-client-test
serviceGroup.setServiceGroupName(serviceName);
servicesURL = new URL(servicesURL.toString() + "/"); // ADDED. url's a dir, not a file - TWW
ClassLoader serviceClassLoader = Utils.createClassLoader(new URL[] { servicesURL }, axisConfig
.getServiceClassLoader(), false, null); // MODIFIED. SET extractJars TO FALSE - TWW
serviceGroup.setServiceGroupClassLoader(serviceClassLoader);
代码示例来源:origin: org.apache.axis2/axis2-kernel
ClassLoader deploymentClassLoader = Utils.createClassLoader(new URL[] { fileUrl },
axisConfig.getModuleClassLoader(), true,
(File) axisConfig.getParameterValue(Constants.Configuration.ARTIFACTS_TEMP_DIR),
代码示例来源:origin: apache/axis2-java
ClassLoader deploymentClassLoader = Utils.createClassLoader(fileUrl, null,
axisConfig.getModuleClassLoader(),
(File) axisConfig.getParameterValue(Constants.Configuration.ARTIFACTS_TEMP_DIR),
代码示例来源:origin: org.apache.axis2/axis2-kernel
urls.add(new File(webLocation).toURI().toURL());
ClassLoader classLoader = Utils.createClassLoader(
urls,
configCtx.getAxisConfiguration().getSystemClassLoader(),
代码示例来源:origin: apache/axis2-java
extraUrls.add(new File(webLocation).toURI().toURL());
ClassLoader classLoader = Utils.createClassLoader(
deploymentFileData.getFile().toURI().toURL(),
extraUrls.toArray(new URL[extraUrls.size()]),
代码示例来源:origin: org.apache.axis2/axis2-kernel
serviceGroup.setServiceGroupName(serviceName);
ClassLoader serviceClassLoader = Utils
.createClassLoader(new URL[] { servicesURL }, axisConfig
.getServiceClassLoader(), true, (File) axisConfig
.getParameterValue(Constants.Configuration.ARTIFACTS_TEMP_DIR),
代码示例来源:origin: apache/axis2-java
serviceGroup.setServiceGroupName(serviceName);
ClassLoader serviceClassLoader = Utils
.createClassLoader(servicesURL, null, axisConfig
.getServiceClassLoader(), (File) axisConfig
.getParameterValue(Constants.Configuration.ARTIFACTS_TEMP_DIR),
代码示例来源:origin: org.apache.axis2/axis2-kernel
public static AxisServiceGroup loadServiceGroup(File serviceFile,
ConfigurationContext configCtx)
throws AxisFault {
try {
DeploymentFileData currentDeploymentFile = new DeploymentFileData(serviceFile, null);
DeploymentClassLoader classLoader = Utils.createClassLoader(serviceFile,
configCtx.getAxisConfiguration().isChildFirstClassLoading());
currentDeploymentFile.setClassLoader(classLoader);
AxisServiceGroup serviceGroup = new AxisServiceGroup();
serviceGroup.setServiceGroupClassLoader(classLoader);
// Drop the extension and take the name
String fileName = serviceFile.getName();
String serviceGroupName = fileName.substring(0, fileName.lastIndexOf("."));
serviceGroup.setServiceGroupName(serviceGroupName);
AxisConfiguration axisConfig = configCtx.getAxisConfiguration();
ArchiveReader archiveReader = new ArchiveReader();
HashMap<String, AxisService> wsdlServices = archiveReader.processWSDLs(currentDeploymentFile);
InputStream serviceXml = classLoader.getResourceAsStream("META-INF/services.xml");
ArrayList<AxisService> serviceList = archiveReader.buildServiceGroup(serviceXml,
currentDeploymentFile,
serviceGroup,
wsdlServices, configCtx);
fillServiceGroup(serviceGroup, serviceList, null, axisConfig);
return serviceGroup;
} catch (Exception e) {
throw new DeploymentException(e);
}
}
代码示例来源:origin: apache/axis2-java
public static AxisServiceGroup loadServiceGroup(File serviceFile,
ConfigurationContext configCtx)
throws AxisFault {
try {
DeploymentFileData currentDeploymentFile = new DeploymentFileData(serviceFile, null);
DeploymentClassLoader classLoader = Utils.createClassLoader(serviceFile,
configCtx.getAxisConfiguration().isChildFirstClassLoading());
currentDeploymentFile.setClassLoader(classLoader);
AxisServiceGroup serviceGroup = new AxisServiceGroup();
serviceGroup.setServiceGroupClassLoader(classLoader);
// Drop the extension and take the name
String fileName = serviceFile.getName();
String serviceGroupName = fileName.substring(0, fileName.lastIndexOf("."));
serviceGroup.setServiceGroupName(serviceGroupName);
AxisConfiguration axisConfig = configCtx.getAxisConfiguration();
ArchiveReader archiveReader = new ArchiveReader();
HashMap<String, AxisService> wsdlServices = archiveReader.processWSDLs(currentDeploymentFile);
InputStream serviceXml = classLoader.getResourceAsStream("META-INF/services.xml");
ArrayList<AxisService> serviceList = archiveReader.buildServiceGroup(serviceXml,
currentDeploymentFile,
serviceGroup,
wsdlServices, configCtx);
fillServiceGroup(serviceGroup, serviceList, null, axisConfig);
return serviceGroup;
} catch (Exception e) {
throw new DeploymentException(e);
}
}
代码示例来源:origin: org.apache.tuscany.sca/tuscany-binding-ws-runtime-axis2
final URL rampartURL = new URL(axis2Config.repositoryURL.toString() + "modules/rampart-1.4.mar");
ClassLoader deploymentClassLoader = org.apache.axis2.deployment.util.Utils.createClassLoader(
new URL[]{rampartURL},
axisConfiguration.getModuleClassLoader(),
内容来源于网络,如有侵权,请联系作者删除!