Uploaded image for project: 'JBoss Web Services'
  1. JBoss Web Services
  2. JBWS-153

invalid schemaLocation generated for imported schema

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • jboss-ws4ee-4.0.2
    • jboss-ws4ee-4.0.1
    • jbossws-native
    • 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.

            tdiesler@redhat.com Thomas Diesler
            ddunkin_jira Dave Dunkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 30 minutes
                30m
                Remaining:
                Remaining Estimate - 30 minutes
                30m
                Logged:
                Time Spent - Not Specified
                Not Specified