Or you can try to use _type=xml query if possible, or write RequestFilter which will check if it's */* and if yes then replace Message Accept value with application/xml
Cheers, Sergey -----Original Message----- From: Sergey Beryozkin [mailto:[email protected]] Sent: 17 February 2009 14:33 To: [email protected] Subject: RE: Selecting default media type [...@producemime] Hi In CXF 2.1.3 JAXB provider is considered less specific as it has no explicit ProduceMime/ConsumeMime values. In 2.1.4 you can explicitly register JAXB provider (org.apache.cxf.jaxrs.provider.JAXBElementprovider) and this will ensure that Accept:*/* is mapped to JAXB... Cheers, Sergey -----Original Message----- From: CXFbanda [mailto:[email protected]] Sent: 17 February 2009 13:34 To: [email protected] Subject: Selecting default media type [...@producemime] Hi, I have two methods in the resource class having @ProduceMime("application/json") & @ProduceMime("application/xml") Any incoming request with header - Accept:*/* is being mapped to json by default. However, I require it to be xml. Anyway, I can do that? I tried using @ProduceMime("*/*") on the 3rd method but still it's invoking json. Any help is appreciated. Thanks -- View this message in context: http://www.nabble.com/Selecting-default-media-type--%40ProduceMime--tp22 057396p22057396.html Sent from the cxf-user mailing list archive at Nabble.com.
