Author: alessio.soldano(a)jboss.com
Date: 2009-04-28 06:01:35 -0400 (Tue, 28 Apr 2009)
New Revision: 9901
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ArchiveDeploymentImpl.java
Log:
[JBWS-2619] Fixing metadata search
Modified:
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ArchiveDeploymentImpl.java
===================================================================
---
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ArchiveDeploymentImpl.java 2009-04-28
09:51:24 UTC (rev 9900)
+++
framework/trunk/src/main/java/org/jboss/wsf/framework/deployment/ArchiveDeploymentImpl.java 2009-04-28
10:01:35 UTC (rev 9901)
@@ -123,11 +123,17 @@
if (resourceURL == null && metadataFiles != null &&
!metadataFiles.isEmpty())
{
UnifiedVirtualFile vfResource = null;
- for (Iterator<UnifiedVirtualFile> it = getMetadataFiles().iterator();
it.hasNext() && vfResource != null; )
+ for (Iterator<UnifiedVirtualFile> it = getMetadataFiles().iterator();
it.hasNext() && vfResource == null;)
{
UnifiedVirtualFile uvf = it.next();
- if (resourcePath.equals(uvf.getName()))
+ URL wsdlUrl = uvf.toURL();
+ String wsdlPath = wsdlUrl.getPath();
+ if (wsdlPath.startsWith("/"))
+ wsdlPath = wsdlPath.substring(1);
+ if (resourcePath.equals(wsdlPath))
+ {
vfResource = uvf;
+ }
else
{
try
@@ -142,6 +148,8 @@
}
if (vfResource == null)
throw new IOException("Could not find " + resourcePath + "
in the additional metadatafiles!");
+
+ resourceURL = vfResource.toURL();
}
}
Show replies by date