Hi
On 11/03/13 20:37, Jose María Zaragoza wrote:
Hello:

We're using Apache CXF 2.7.3

I would like if it's possible to configure media-types of a REST
service in Spring context file (bean.xml)

I would like to declare into<jaxrs:server/>   which media-types accepts
I'm not saying to add custom providers to process message by  its
media-type, but to declare "all this service consumes/produces these
media types"

I guess what you'd like to do is to avoid adding the annotations but provide some external info describing the resources, if so, then working with a user model is what will do:

http://cxf.apache.org/docs/jax-rs-advanced-features.html#JAX-RSAdvancedFeatures-RESTfulserviceswithoutannotations

You can create a model as an external resource and then link to it from jaxrs:server with a modelRef attribute.

You can combine that with registering service beans, so the model can refer to interfaces and then you can have the implementations registered as service beans which possibly provide more info like @Path, etc, or the model can refer to the actual implementations...

HTH, Sergey

Thanks and regards

Reply via email to