Discussion:
cxf jaxrs Manually configure of ServiceClass
Vassilis Virvilis
2018-11-21 13:39:15 UTC
Permalink
Hi,

I am not using Spring

I am interested in manually configuring individual serviceClasses (i.e. for adding Providers per serviceClass).

This is possible with spring but looks impossible without spring.

Is there a way to do it?

I tried to access the Endpoints/ServiceClasses after they have been loaded as specified in web.xml but failed.

Do I need to launch my own JaxRsFactoryBean?

Vassilis
James Carman
2018-11-21 13:47:02 UTC
Permalink
It is indeed possible:

https://github.com/jaxxy-rs/jaxxy/blob/master/test/src/main/java/org/jaxxy/test/JaxrsTestCase.java

This should give you enough inspiration for what you're trying to do.
On Wed, Nov 21, 2018 at 8:39 AM Vassilis Virvilis
Post by Vassilis Virvilis
Hi,
I am not using Spring
I am interested in manually configuring individual serviceClasses (i.e. for adding Providers per serviceClass).
This is possible with spring but looks impossible without spring.
Is there a way to do it?
I tried to access the Endpoints/ServiceClasses after they have been loaded as specified in web.xml but failed.
Do I need to launch my own JaxRsFactoryBean?
Vassilis
Vassilis Virvilis
2018-11-21 15:06:36 UTC
Permalink
Thanks for the pointer.

Looks like I have to do my own JAXRSServerFactoryBean.

Looks like the objects coming out of this factory are immutable because I cannot find a way to configure a Server(of serviceClass) __after__ it has been created by web.xml parsing. All the options are on the factory and not at the serviceClass server object.

Again thanks for the quick reply.

Vassilis
Post by James Carman
https://github.com/jaxxy-rs/jaxxy/blob/master/test/src/main/java/org/jaxxy/test/JaxrsTestCase.java
This should give you enough inspiration for what you're trying to do.
On Wed, Nov 21, 2018 at 8:39 AM Vassilis Virvilis
Post by Vassilis Virvilis
Hi,
I am not using Spring
I am interested in manually configuring individual serviceClasses (i.e. for adding Providers per serviceClass).
This is possible with spring but looks impossible without spring.
Is there a way to do it?
I tried to access the Endpoints/ServiceClasses after they have been loaded as specified in web.xml but failed.
Do I need to launch my own JaxRsFactoryBean?
Vassilis
Loading...