Hi!
I'm trying to create a CXF-RS server based on a Pax-CDI bean.
This bean is necessarily a CDI one because I'm using Hibernate Validator
CDI extension to validate it:
@Named
@Path ("/")
public class MyBean {
@POST
@Consumes(XML)
public void addSomething(@Valid Something something) {/*do stuff*/}
}}
I was used to declare my RS services server in the blueprint file:
<jaxrs:server id="beanServiceCXF" address="/beanService">
<jaxrs:serviceBeans>
<ref component-id="myBean" />
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref component-id="jaxbProvider" />
<ref component-id="jsonProvider" />
<bean id="validationException"
class="helpers.cxf.exception.handling.jaxrs.mapper.ExceptionXmlMapper" />
</jaxrs:providers>
</jaxrs:server>
<cxf:bus>
<cxf:features>
<cxf:logging />
</cxf:features>
</cxf:bus>
Unfortunately, I'm not able to inject this CDI Bean as a blueprint
reference (a workaround could be to export this CDI bean as an OSGI service
and reference it on another bundle that exposes the web service but it's a
little overengineered): is there a way to do this? for example accessing to
the bundle Blueprint component registry and adding this CDI bean?
Thank you in advance,
Charlie