[
https://issues.apache.org/jira/browse/CXF-7262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Beryozkin resolved CXF-7262.
-----------------------------------
Resolution: Fixed
Assignee: Sergey Beryozkin
Fix Version/s: 3.1.11
3.2.0
Andy, thanks for the patch, I did minor follow up updates as it became obvious
the builder build try was redundant, I do not recall now why I did it, probably
wanted to make sure the URI which was still parameterized would not make it
into the underlying WebClient... Added a system test and did a minor tweak to
the test code for it to compile with Java 7
thanks
> JAXRS: ClientConfig lost when using templates in the path method
> ----------------------------------------------------------------
>
> Key: CXF-7262
> URL: https://issues.apache.org/jira/browse/CXF-7262
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 3.1.8
> Reporter: Andy McCright
> Assignee: Sergey Beryozkin
> Fix For: 3.2.0, 3.1.11
>
>
> 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
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)