Hi Dave; This is a serious bug in the code pls create a JIRA
Dave MacLean wrote: >Hi Everyone, >It looks like may be 2 problems with the way schema imports are loaded >from the aar files. > >The first, is that when the AARFileBasedURIResolver is searching for a >given (relative) location, it only matches beginning and end. That is, >if I'm importing a schema at relative location "xsd/my_schema.xsd", then >the resolver is going to match any files in the aar that have a path >starting with "meta-inf" and ending with "xsd/my_schema.xsd". > >So, if my aar file structure looks like: > >meta-inf/my_wsdl.wsdl (has the import of xsd/my_schema.xsd) >meta-inf/xsd/my_schema.xsd >meta-inf/some_other_bad_but_useful_xsd/my_schema.xsd > >Then, in some cases the second xsd will get loaded, which can cause some >problems. > > > >For the second, assume the same scenario as above, with my_wsdl.wsdl >importing xsd/my_schema.xsd. > >Now, if my_schema.xsd imports another xsd, using a relative location of >"my_schema2.xsd", then I don't think the resolver takes the relative >path into consideration. It ends up searching for a file starting with >"meta-inf" and ending with "my_schema2.xsd". > >It just happens that this will match meta-inf/xsd/my_schema2.xsd (which >is what we want), but it will also match a lot of other files >incorrectly (meta-inf/some_other_bad_but_useful_xsd/my_schema2.xsd, >meta-inf/foobar/my_schema2.xsd, etc). > >Is my understanding of how relative imports should work correct? That >if xsd/my_schema.xsd imports a file at location "my_schema2.xsd", then >it should be found, and only be found, at xsd/my_schema2.xsd? > >I think one way to fix this would be to update the baseUri passed into >AARFileBasedURIResolver.resolveEntity to include the "path found so >far", and then modify the filename checking if-clause to be a little >more strict. > >Is this worth fixing? > >Thanks, > >Dave > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > > > > -- Thanks, Deepal ................................................................ ~Future is Open~ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
