cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Veit Guna <veit.g...@gmx.de>
Subject Re: @...Param and client proxy
Date Sun, 04 Oct 2015 09:12:17 GMT
While working around the nested @BeanParam for now, I encountered the fact,
that @...Param annotations work on fields now, but somehow getter/setter
for that field
are still required. Leaving them out, will leave the value unset on request.

On the opposite, the Jersey server is fine with fields without
getter/setter.

Is this by intention?

Thanks
Veit

Am 04.10.2015 um 10:25 schrieb Veit Guna:
> Ok, 3.0.5 seems to fix the field annotation issue - nice :).
>
> One to go...
>
> Am 04.10.2015 um 10:13 schrieb Veit Guna:
>> Hi.
>>
>> I'm using Apache CXF 3.0.4 on client side against a Jersey based REST
>> service.
>> On client side I'm using the CXF client proxy using the server side
>> interface classes.
>>
>> Now I encountered, that annotated fields (e.g. with @QueryParam) on
>> @BeanParam classes
>> are ignored when invoking a method passing the @BeanParam class.
>> Somewhere in a JIRA ticket,
>> I found the hint, that setters must be annotated instead. Doing so does
>> work indeed.
>>
>> Is there a reason, why annotations on fields aren't supported? Isn't
>> this allowed based
>> on the JAX-RS spec? Since Jersey seems fine with it. The problem I have
>> is, that I would
>> have to change the server beans to be able to use the CXF client proxy.
>>
>> Another thing I encountered is, that nested @BeanParam's doesn't seem to
>> be supported.
>>
>> Having (pseudocode):
>>
>> class A {
>>  B b;
>>  
>>  @BeanParam
>>  set(B b);
>>  B get();
>> }
>>
>> class B {
>>  String bar;
>>
>>  @QueryParam("foo")
>>  set(String bar);
>>  String get();
>> }
>>
>> Interface {
>>  something(@BeanParam A a);
>> }
>>
>> Invoking Jersey's endpoint manually giving the query params seem to work
>> without a problem.
>> I'm missing something?
>>
>> Thanks
>> Veit
>>
>>
>>


Mime
View raw message