Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-6527

WSDLRefValidator reject valid target reference URI/IRI

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.1.3, 2.7.18, 3.0.7
    • Component/s: Tooling
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      When a target namespace have “:” in the path part of the URI, the validator reject the WSDL.

      This is due to this piece of code at line 137 of tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java file.

      private void checkTargetNamespace(String path) {
           try {
              if (new URL(path).getPath().indexOf(":") != -1) {
                  throw new ToolException(": is not a valid char in the targetNamespace");
              }
         } catch (MalformedURLException e) {
              // do nothing
         }
      }
      

      I checked the following specifications:

      and nothing forbids having a target namespace like the following one:
      http://host:port/part/part/resource:resource

      Then the validator add an extra constraint on the WSDL format without any explanation.

      I looked into the source history, this validation is here since a long period (before going to git), then I was not able to find out the reason behind this explicit check.

      Could fix this bug or explain why there is a such limitation?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ay Akitoshi Yoshida
                Reporter:
                rchanter Romain Chantereau
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: