Hi

>        @GET
>        @Path("/media")
>        @Produces("audio/x-mpeg")
>        public MediaResponse getRingTone() {
>        }
>
> and now my Class MediaResponse
>
>
> @XmlAccessorType(XmlAccessType.FIELD)
> @XmlType(name = "", propOrder = {
>    "status",
>    "media"
> })
> @XmlRootElement(name = "MediaResponse")
> public class MediaResponse {
>


The problem here is that you expect JAXB manage the serialization of
MediaResponse but default JAXBProvider does not support "audio/x-mpeg"
OTB, thus you need to configure
org.apache.cxf.jaxrs.provider.JAXBElementProvider explicitly and set a
"producesMediaType" list property listing "audio/x-mpeg", possibly
application/xml, etc.

Cheers, Sergey

Reply via email to