Hi Brad

> I prefer the XML first approach and would like to build a RESTful
> service which either can use my already generated XMLBeans classes
> (prefered option) or generate JAXB java binding classes from my
> schema.

No problems for a JAXB option, it should work just fine. CXF 
JAXBElementProvider checks if @XMLRootAnnotation is present. 
Fox XMLBeans, a simple custom provider would need to be added. Perhaps we 
should have it supported by default. Barry has added a system test showing how 
to write a JSON BadgerFish JAX-RS Provider  (I was actually very surprised to 
find out BadgerFish is a real thing which lives in the Jettison project)

Cheers, Sergey 


> Hi,
> 
> I'm interested in using the jax-rs support in CXF. From the examples
> I've seen it appears that I'm required to take that Java first
> approach and let JAXB take care of the Java to XML mapping. Is this
> correct?
> 
> I prefer the XML first approach and would like to build a RESTful
> service which either can use my already generated XMLBeans classes
> (prefered option) or generate JAXB java binding classes from my
> schema.
> 
> Is this possible? The important things here for me are to have the
> schema dictate what the XML looks like and to have it as a REST
> service. If its not possible using JAX-RS, does CXF have an
> alternative method to achieve the desired results?
> 
> Thanks,
> Brad.

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Reply via email to