You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Veit Guna <ve...@gmx.de> on 2015/12/01 22:43:15 UTC

@BeanParam doesn't seem to support inheritance on client side

Hi.

I'm using Apache CXF 3.1.4 with JAX-RS 2.0 client side proxies against a
REST service which uses Jersey 2.19 under JDK8.
The client side uses CXF to generate the client proxies from the server
interfaces. The server interface has a method that
has a @BeanParam in its signature.

Calling this method from the client side worked without a problem.

Now, I introduced inheritance on that @BeanParam POJO. Switched the
server side method signature to the new @BeanParam subclass
and invoked the method from the client side with the new subclass.

The result is, that attributes from the subclass are received on the
server, but not the attributes from the superclass. Somehow they
get lost. Getter/Setter on the @BeanParam's classes are in place.

Any idea what goes wrong?

Thanks
Veit





Re: @BeanParam doesn't seem to support inheritance on client side

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Veit

The proxy impl was not checking fields on superclasses, got it fixed:

https://issues.apache.org/jira/browse/CXF-6701

If you can move JAX-RS annotations to setters then it will work without 
a fix, it will be a bit faster too

Thanks, Sergey
On 01/12/15 21:47, Veit Guna wrote:
> I forgot to mention, that the attributes are decorated on field level
> with @QueryParam, of course.
>
> Am 01.12.2015 um 22:43 schrieb Veit Guna:
>> Hi.
>>
>> I'm using Apache CXF 3.1.4 with JAX-RS 2.0 client side proxies against a
>> REST service which uses Jersey 2.19 under JDK8.
>> The client side uses CXF to generate the client proxies from the server
>> interfaces. The server interface has a method that
>> has a @BeanParam in its signature.
>>
>> Calling this method from the client side worked without a problem.
>>
>> Now, I introduced inheritance on that @BeanParam POJO. Switched the
>> server side method signature to the new @BeanParam subclass
>> and invoked the method from the client side with the new subclass.
>>
>> The result is, that attributes from the subclass are received on the
>> server, but not the attributes from the superclass. Somehow they
>> get lost. Getter/Setter on the @BeanParam's classes are in place.
>>
>> Any idea what goes wrong?
>>
>> Thanks
>> Veit
>>
>>
>>
>>
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Re: @BeanParam doesn't seem to support inheritance on client side

Posted by Veit Guna <ve...@gmx.de>.
I forgot to mention, that the attributes are decorated on field level
with @QueryParam, of course.

Am 01.12.2015 um 22:43 schrieb Veit Guna:
> Hi.
>
> I'm using Apache CXF 3.1.4 with JAX-RS 2.0 client side proxies against a
> REST service which uses Jersey 2.19 under JDK8.
> The client side uses CXF to generate the client proxies from the server
> interfaces. The server interface has a method that
> has a @BeanParam in its signature.
>
> Calling this method from the client side worked without a problem.
>
> Now, I introduced inheritance on that @BeanParam POJO. Switched the
> server side method signature to the new @BeanParam subclass
> and invoked the method from the client side with the new subclass.
>
> The result is, that attributes from the subclass are received on the
> server, but not the attributes from the superclass. Somehow they
> get lost. Getter/Setter on the @BeanParam's classes are in place.
>
> Any idea what goes wrong?
>
> Thanks
> Veit
>
>
>
>