You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/03/01 22:37:45 UTC

[jira] [Commented] (CXF-7262) JAXRS: ClientConfig lost when using templates in the path method

    [ https://issues.apache.org/jira/browse/CXF-7262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15891218#comment-15891218 ] 

ASF GitHub Bot commented on CXF-7262:
-------------------------------------

GitHub user andymc12 opened a pull request:

    https://github.com/apache/cxf/pull/240

    CXF-7262: Preserve client config after path(...) calls

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/andymc12/cxf clientconfig

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cxf/pull/240.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #240
    
----
commit 394c6003d1a10b47abd6e944d888a1d3472c349c
Author: Andy McCright <an...@us.ibm.com>
Date:   2017-03-01T22:35:09Z

    CXF-7262: Preserve client config after path(...) calls

----


> 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
>
> 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)