Re: CXF REST - output in both XML & JSON

2008-06-27 Thread David Castro
Thanks. I'll give that a try. Britt Crawford wrote: You just need to add the annotation @ProduceMime({"application/xml", "application/json"}) to your service methods. You can add @ConsumeMime({"application/xml", "application/json"}) to allow the to receive input in both formats as well.

Re: CXF REST - output in both XML & JSON

2008-06-27 Thread Britt Crawford
ient "Accept" format? > Or if not possible, what about mapping the same service methods to > different URLs with different output types. > > Cheers, > David > > > -- View this message in context: http://www.nabble.com/CXF-REST---output-in-both-XML---JSON-tp18124045p18163838.html Sent from the cxf-user mailing list archive at Nabble.com.

CXF REST - output in both XML & JSON

2008-06-25 Thread David Castro
Is there a way to use the same service class and methods to generate both XML and JSON output depending on say the client "Accept" format? Or if not possible, what about mapping the same service methods to different URLs with different output types. Cheers, David