Hi On Fri, Nov 12, 2010 at 5:01 PM, Stefan <[email protected]> wrote:
> So, there is no way of doing this via an API at the moment, right? > It is possible, either use JAXRSServerFactoryBean or extend CXFNonSpringJAXRSServlet and override its getProviders() method. Actually, you can register a JAXRS Application implementation with CXFNonSpringJAXRSServlet and have providers loaded and configured. The only limitation of all these approaches is that you will be encoding the configuration in the code, that is why enhancing a bit the user model feature would be useful. > I´m completely new to cxf, so I doubt you want me to do a patch for this > ;-) > I would, surely it would be a perfect patch :-). I'll deal with extending the user model a bit though thanks, Sergey > Regards,Stefan > > ----- Original Message ----- From: "Sergey Beryozkin" < > [email protected]> > To: <[email protected]> > Sent: Friday, November 12, 2010 2:40 PM > Subject: Re: How to configure JAXBProvider > > > > I think we may need to extend a user model (which is possible to reference > from CXFNonSpringJAXRSServlet) and also support configuring the providers > with simple properties, ex, > > <model> > <resources/> > <providers> > <!-- load the class, create the instance and reflectively set simple > props --> > <provider class="org.apache.cxf.jaxrs.provider.JAXBElementProvider"> > <propery name="x" value="b"/> > </provider> > <providers> > </model> > > If you are interested then please consider doing a patch :-) > > thanks, Sergey > > On Thu, Nov 11, 2010 at 8:11 PM, Stefan <[email protected]> wrote: > > Hi, >> >> I´m creating a JAX-RS service on tomcat without using spring. Everything >> was working fine for me till I reached the point that I need to marshal >> java >> objects using JAXB which I cannot annotate using the @XmlRootElement >> annotation. I found some documentation that this is not a problem if I >> configure the JAXB provider properly: >> >> >> >> http://cxf.apache.org/docs/jax-rs.html#JAX-RS-HandlingJAXBbeanswithoutXmlRootElementannotations >> >> As far a I got it, this only works if I´m using spring. Is there any >> documentation how to this also without spring? >> Thanks for an help. >> Regards, >> Stefan >> >> >
