You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Dave MacLean <Da...@businessobjects.com> on 2006/05/18 20:22:18 UTC
[Axis2 1.0] WSDL schema imports still not completely working
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: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2 1.0] WSDL schema imports still not completely working
Posted by Deepal Jayasinghe <de...@opensource.lk>.
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: axis-user-unsubscribe@ws.apache.org
>For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
>
--
Thanks,
Deepal
................................................................
~Future is Open~
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
Re: [Axis2 1.0] WSDL schema imports still not completely working
Posted by Davanum Srinivas <da...@gmail.com>.
Dave,
Please add any more info here to the bug u already created:
http://issues.apache.org/jira/browse/AXIS2-748
let's work on it in JIRA.
thanks,
dims
On 5/18/06, Dave MacLean <Da...@businessobjects.com> 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: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
--
Davanum Srinivas : http://wso2.com/blogs/
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org