Hi Francesco,

Did a basic update of the client proxy code to check BeanParam fields so having annotations on fields should work in 3.0.5.

Sergey
On 23/04/15 13:17, Sergey Beryozkin wrote:
Hi,

I've checked the code, right now only annotations on the BeanParam bean
setters are recognized on the client side so if you move them from
fields to setters then it will work. I believe I did fix the server side
code awhile back to check BeanParam bean fields too but haven't updated
the client proxy code.
So, another workaround is needed for now :-)

Thanks, Sergey


On 23/04/15 12:56, Francesco Chicchiriccò wrote:
Hi,
with reference to the solutions proposed in this thread [1] to avoid
forcing client code passing null parameters, I am exploring @BeanParam.

I have now UserService (an interface) with a brand new list() method
like as

     @GET
     @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
     PagedResult<UserTO> list(@BeanParam ListQuery listQuery);

and my ListQuery bean is as [2].

Now, when invoking

http://localhost:9080/syncope/rest/users;realm=%2Feven%2Ftwo;realm=%2Fodd

I received an error 500:

[...]
Caused by: java.lang.AbstractMethodError:
org.apache.syncope.core.rest.cxf.service.UserServiceImpl.list(Lorg/apache/syncope/common/rest/api/beans/ListQuery;)Lorg/apache/syncope/common/lib/to/PagedResult;



If I check the URL generated by client code for

         ListQuery lq = new ListQuery();
         lq.setRealms(Arrays.asList("/even/two", "/odd"));

I see that

http://localhost:9080/syncope/rest/users

is generated (e.g. without realms).

What am I doing wrong?
TIA

Regards.

[1]
http://cxf.547215.n5.nabble.com/JAX-RS-Matrix-parameters-and-method-matching-tp5756387p5756414.html


[2] https://paste.apache.org/aHaK



Reply via email to