You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by axelr <ar...@ordix.de> on 2015/06/16 12:19:43 UTC

jaxrs-client:client with abstract=true / reuse configuration

I want to inject several client proxies by spring. Most of them have the same
definition. So one service is defined like this:


With the exception of the serviceClass some other services/proxies are
configured identically. It looks strange if the whole configuration is
repeated n times for every service. Is there a way to reuse the
configuration? I saw that there is an abstract attribute for
jaxrs-client:client, but I haven't found a way to reference to this
(abstract) parent by other client definitions.
One way could be to use a common resource class that provides access to all
other proxies (as subresources). But then I am not able to use the proxies
directly because only the common resource class can be injected.

Any ideas?

Regards
Axel



--
View this message in context: http://cxf.547215.n5.nabble.com/jaxrs-client-client-with-abstract-true-reuse-configuration-tp5758318.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: jaxrs-client:client with abstract=true / reuse configuration

Posted by axelr <ar...@ordix.de>.
With spring core notation it would look like:


But it would be great (more descriptive and easier) to use the rsclient
elements.

And I'm still wondering about the attribute 'abstract' in rsclient:client.

Cheers, Axel



--
View this message in context: http://cxf.547215.n5.nabble.com/jaxrs-client-client-with-abstract-true-reuse-configuration-tp5758318p5758352.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: jaxrs-client:client with abstract=true / reuse configuration

Posted by Sergey Beryozkin <sb...@gmail.com>.
JAX-RS client proxies can not be yet created from the abstract elements, 
I agree it is a useful feature that JAX-WS proxies support,
I'll ask Dan for some help in explaining how this can be realized

Cheers, Sergey
On 16/06/15 11:19, axelr wrote:
> I want to inject several client proxies by spring. Most of them have the same
> definition. So one service is defined like this:
>
>
> With the exception of the serviceClass some other services/proxies are
> configured identically. It looks strange if the whole configuration is
> repeated n times for every service. Is there a way to reuse the
> configuration? I saw that there is an abstract attribute for
> jaxrs-client:client, but I haven't found a way to reference to this
> (abstract) parent by other client definitions.
> One way could be to use a common resource class that provides access to all
> other proxies (as subresources). But then I am not able to use the proxies
> directly because only the common resource class can be injected.
>
> Any ideas?
>
> Regards
> Axel
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/jaxrs-client-client-with-abstract-true-reuse-configuration-tp5758318.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>