[jbossws-commits] JBossWS SVN: r9901 - framework/trunk/src/main/java/org/jboss/wsf/framework/deployment.

jbossws-commits at lists.jboss.org jbossws-commits at lists.jboss.org
Tue Apr 28 06:01:35 EDT 2009


Author: alessio.soldano at 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();
          }
       }
 




More information about the jbossws-commits mailing list