Author: rsearls
Date: 2013-12-04 08:12:24 -0500 (Wed, 04 Dec 2013)
New Revision: 18126
Modified:
framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/deployment/ResourceResolverImpl.java
Log:
JBPAPP-10903: check server classloader when wsdl location starts with classpath:.
Modified:
framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/deployment/ResourceResolverImpl.java
===================================================================
---
framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/deployment/ResourceResolverImpl.java 2013-12-04
01:15:17 UTC (rev 18125)
+++
framework/branches/jbossws-framework-3.1.2/src/main/java/org/jboss/wsf/framework/deployment/ResourceResolverImpl.java 2013-12-04
13:12:24 UTC (rev 18126)
@@ -117,10 +117,23 @@
}
}
}
- if (vfResource == null)
- throw new IOException("Could not find " + resourcePath + "
in the additional metadatafiles!");
-
- resourceURL = vfResource.toURL();
+
+ if (resourceURL == null &&
resourcePath.startsWith("classpath:")) {
+
+ resourcePath = resourcePath.substring("classpath:".length());
+ ClassLoader cl = this.getClass().getClassLoader();
+ resourceURL = cl.getResource(resourcePath);
+
+ if (resourceURL == null)
+ throw new IOException("Could not find " + resourcePath +
" in the server classpath!");
+
+ } else {
+
+ if (vfResource == null)
+ throw new IOException("Could not find " + resourcePath +
" in the additional metadatafiles!");
+
+ resourceURL = vfResource.toURL();
+ }
}
}
return resourceURL;
Show replies by date