if (resourceURL == null && rootFile != null)
{
try
{
UnifiedVirtualFile vfResource = rootFile.findChild(resourcePath);
resourceURL = vfResource.toURL();
}
catch (IOException e)
{
if (metadataFiles == null || metadataFiles.isEmpty())
{
throw e;
}
else
{
if (log.isDebugEnabled())
log.debug("Cannot get " + resourcePath + " from root file, trying with additional metadata files", e);
}
}
}
//scan additional metadata files (for instance originally attached to a VFSDeploymentUnit)
if (resourceURL == null && metadataFiles != null && !metadataFiles.isEmpty())
{
UnifiedVirtualFile vfResource = null;
for (Iterator<UnifiedVirtualFile> it = metadataFiles.iterator(); it.hasNext() && vfResource == null;)
{
UnifiedVirtualFile uvf = it.next();
URL wsdlUrl = uvf.toURL();
String wsdlPath = wsdlUrl.getPath();
if (wsdlPath.startsWith("/"))
wsdlPath = wsdlPath.substring(1);
if (resourcePath.equals(wsdlPath))
{
vfResource = uvf;
}
else
{
try
{
vfResource = uvf.findChild(resourcePath);
}
catch (IOException e)
{
if (log.isDebugEnabled())
log.debug("Cannot get " + resourcePath + " from " + uvf, e);