-
Bug
-
Resolution: Done
-
Major
-
jboss-ws4ee-4.0.1
-
None
I believe this bug (http://sourceforge.net/tracker/index.php?func=detail&aid=1041622&group_id=22866&atid=376685) was fixed incorrectly. The method org.jboss.webservice.server.InvokerProvider.modifyImportLocations() rewrites urls in wsdl schemas so they can be followed. Right now, if I import a file foo/bar/types.xsd that imports the schema ../../bar/foo/types.xsd, it fails because the url is incorrectly rewritten.
It is:
if (resourcePath != null && resourcePath.indexOf("/") > 0
&& !orgLocation.startsWith("../") )
newResourcePath = resourcePath.substring(0, resourcePath.indexOf("/") + 1) + orgLocation;
But it should be:
if (resourcePath != null && resourcePath.indexOf("/") > 0)
newResourcePath = resourcePath.substring(0, resourcePath.lastIndexOf("/") + 1) + orgLocation;
A path starting with .. should not be a special case. The original bug was that indexOf should have been lastIndexOf.
- relates to
-
JBWS-277 Add support for wsdl and schema rewriting
- Closed