axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave MacLean (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-748) AARWSDLLocator incorrect logic - may load incorrect files under certain scenarios
Date Thu, 18 May 2006 02:47:05 GMT
AARWSDLLocator incorrect logic - may load incorrect files under certain scenarios
---------------------------------------------------------------------------------

         Key: AXIS2-748
         URL: http://issues.apache.org/jira/browse/AXIS2-748
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug

  Components: deployment  
    Versions: 1.0    
 Environment: win32_x86 (windows xp sp2), tomcat 5.1, eclipse 3.2 with tomcat plugin, axis
2.0 1.0, Intel P4 2.8Ghz, 2.00GB RAM
    Reporter: Dave MacLean
    Priority: Minor


The following code in AARWSDLLocator.java will fail in a certain scenario (described below):

...
            while ((entry = zin.getNextEntry()) != null) {
                String entryName = entry.getName();
                if ((entryName.startsWith(DeploymentConstants.META_INF.toLowerCase())
                        || entryName.startsWith(DeploymentConstants.META_INF))
                        && entryName.endsWith(importLocation)) {
...

If I have a wsdl file that has an import like:

<s:import namespace="some_namespace" schemaLocation="xsd/some_namespace.xsd"/>

And then, in my aar file, I have the files:

META-INF/xsd/some_namespace.xsd
META-INF/some_bad_other_xsd/some_namespace.xsd

The locator seems to try and load both files.  At the very least, the if condition is met,
and later down the line, an XMLSchemaException is thrown as follows:

Error: org.apache.axis2.deployment.DeploymentException: java.lang.RuntimeException: org.apache.ws.commons.schema.XmlSchemaException:
No namespace found in given base simple content type

If you remove the excess xsd file, the problem goes away.  So...I think the if statement here
needs to be fixed to not include directories that happen to end with the import location.

Marking as minor since I can change my directory strutcure, but would be major for someone
who was unable to change the stucture of their files.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message