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

Base URL caching in ServletController avoids needed updateDests() call on republishing endpoints

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.1
    • Fix Version/s: 2.0.8, 2.1.2
    • Component/s: Transports
    • Labels:
      None
    • Environment:

      Standalone Jetty

    • Estimated Complexity:
      Moderate

      Description

      In updateDests() the following:

      if (base.equals(lastBase))

      { return; }

      returns on equal base URLs which results in avoiding the needed second call of

      d2.getEndpointInfo().setAddress(base + path);

      which is needed to set the fully qualified URI, because the first setAdress() call made by invoke() just sets the relative path.

      What i do is:

      1. I use the CXFServlet in combination with Jetty (using nearly the original example) except of using
      root.addServlet(servlet, "/soap/") instead of just "/" as the base path.
      Now i do:

      Endpoint.publish("/testService", impl)

      resulting in a ServletController which first sets in invoke() the adress to '/testService' and after that the adress will be set again in updateDests() but this time as 'http://localhost:8123/soap/testService'

      This works fine for me, now i can load the WSDL for example.

      2. The problem now occurs if i indirectly reuse the ServletController by doing the following:

      endpoint.stop();
      Endpoint.publish("/testService", impl)

      because the second EndpointInfo.setAdress() call won't be made, because of the base URL matching in updateDests() as shown above.

      • The base URL is not changing.
      • The second fully qualified EndpointInfo.setAdress() call is missing.
      • EndpointInfo contains '/testService' and not as needed 'http://localhost:8123/soap/testService'
      • Calling WSDL FQ-URL failes because:
      • WSDLQueryHandler can't identify the request using:

      isRecognizedQuery()
      ...
      return endpointInfo.getAddress().contains(UrlUtilities.getStem(baseUri.substring(0, idx)));

        Attachments

          Activity

            People

            • Assignee:
              dkulp Daniel Kulp
              Reporter:
              strider David Wettig
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: