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

Hard coded slashes at the end of SOAP namespaces are not always appreciated

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Cannot Reproduce
    • 4.0.2
    • None
    • Core, JAX-WS Runtime
    • None
    • Unknown

    Description

      There are some functions that explicitly append a slash to URL's (see below), which is not always helpful. I have a client, unfortunately not under my jurisdiction, that refuses to work with my SOAP-service, since the service exports a WSDL-file, generated by CXF, that has a slash appended.

      I understand that just skipping the slash probably will affect a plethora of applications that rely on it, so maybe an option could be introduced modifying line 178 in the class: "PackageUtils" to:

      • return "http://" + String.join(".", parts) + ((optionNoTrailingSlash) ? "" : '/');

      instead of the current:

      • return "http://" + String.join(".", parts) + '/';

      for example.

      Statements that immutably append slashes

      The following list is the result of a regular expression search, probably not all of them are relevant.

      core/src/main/java/org/apache/cxf/common/util/PackageUtils.java:178:        return "http://" + String.join(".", parts) + '/';
      core/src/main/java/org/apache/cxf/helpers/ServiceUtils.java:211:        return protocol + "://" + String.join(".", words) + "/";
      rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/NewCookieHeaderProvider.java:43:    private static final String TSPECIALS_ALL = TSPECIALS_PATH + "/";
      rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/UriInfoImpl.java:230:            address = address + "/";
      rt/rs/description-swagger-ui/src/main/java/org/apache/cxf/jaxrs/swagger/ui/SwaggerUiResolver.java:69:            return urlStr + UI_RESOURCES_ROOT_START + version + "/";
      rt/transports/http/src/main/java/org/apache/cxf/transport/http/HttpUrlUtil.java:30:            pathString = pathString + "/";
      systests/microprofile/client/jaxrs/src/test/java/org/apache/cxf/systest/microprofile/rest/client/regex/JaxrsPathRegexTest.java:76:        String endpointAddress = "http://localhost:" + PORT + "/";
      systests/microprofile/client/jaxrs/src/test/java/org/apache/cxf/systest/microprofile/rest/client/regex/JaxrsPathRegexTest.java:121:        String endpointAddress = "http://localhost:" + PORT + "/";
      systests/uncategorized/src/test/java/org/apache/cxf/systest/transform/feature/TransformFeatureTest.java:95:        String endpoint = "http://127.0.0.1:" + socket.getLocalPort() + "/";
      tools/corba/src/main/java/org/apache/cxf/tools/corba/processors/idl/ModuleToNSMapper.java:108:                    parentURI = parentURI + "/";

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            agitatra Mark Kahl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment