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

JAXRS: ClientConfig lost when using templates in the path method

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1.8
    • Fix Version/s: 3.1.11, 3.2.0
    • Component/s: JAX-RS
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      The ClientConfiguration (not to be confused with the JAXRS Configuration) is lost when a user of the JAXRS Client APIs calls path(...) on a WebTarget with a template. The ClientConfiguration contains important pieces like Interceptors, etc. that would be lost when the user tries to invoke the method on the WebTarget returned from the path(...) method.

      For example, we create an out interceptor and add it to the ClientConfiguration, and we would expect that interceptor to be executed on every outbound request, but the following example shows that it is not:

      Client client = ClientBuilder.newClient();
      WebTarget target = client.target("http://localhost:8080/myRoot");
      target.request().get(); // works - invokes the interceptor
      WebTarget target2 = target.path("/path/

      {key}

      ").resolveTemplate("key", "value");
      target2.request().get(); // fails - request is sent without invoking the interceptor

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sergey_beryozkin Sergey Beryozkin
                Reporter:
                andymc Andy McCright
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: