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

Sergey Beryozkin commented on CXF-3607:
---------------------------------------

Hi Dan

I talked with Willem, WebClient has a catch-all public invoke() method which 
accepts a String HTTP method name, etc, which CXF RS uses (as opposed to 
choosing between various specific variations of invoke like post, get, etc). 
The idea is there also support arbitrary HTTP verbs (WebDav, PATCH, etc - when 
HTTP transport allows for it). Willem thought that doInvoke() will simplify 
accessing the response status for cases when something like this is done:

CustomResponse cr = webClient.invoke("PUT", body, CustomResponse.class);
However, making doInvoke is indeed not needed here given that 
webClient.getResponse() will always return generic JAXRS Response (and then 
response.getStatus() will do) even if custom class instance was returned 
earlier on.

So as such this issue is nearly won't fix/invalid, but one thing I mentioned to 
Willem was that doInvoke() is a 'better' catch-all invoke() because it allows 
accepts a generic type parameter which is helpful when explicit collections are 
involved, thus I thought renaming it to public 'invoke' can help in some cases, 
ex, WebClient does not support posting or putting explicit collections only. 
But I need to think about the best way to accomplish that...


> Change WebClient doInvoke() method to be public
> -----------------------------------------------
>
>                 Key: CXF-3607
>                 URL: https://issues.apache.org/jira/browse/CXF-3607
>             Project: CXF
>          Issue Type: Improvement
>          Components: JAX-RS
>            Reporter: Willem Jiang
>            Assignee: Willem Jiang
>            Priority: Minor
>
> In CAMEL-4128, the user wants to get the response code after the camel-cxfrs 
> producer.
> It will be convinces for us to get the response code if the WebClient 
> doInvoke method is public.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to