Hi,
Does CXF support the JSR311 @ProduceMime annotation fully? Here's the code:
import com.sun.ws.rest.api.ConsumeMime;
import com.sun.ws.rest.api.HttpMethod;
import com.sun.ws.rest.api.ProduceMime;
import com.sun.ws.rest.api.UriTemplate;
@UriTemplate("/sampleservlet")
public class SampleServlet {
@HttpMethod("PUT")
@ConsumeMime("text/plain")
@ProduceMime("application/xml")
public void getXML() {
System.out.println("### Handle PUT for sampleservlet: XML ###");
}
@HttpMethod("PUT")
@ConsumeMime("text/plain")
@ProduceMime("application/json")
public void getJSON() {
System.out.println("### Handle PUT for sampleservlet: JSON
###");
}
}
When the client specifies the Accept parameter in the http header as
application/json or application/xml I would expect the corresponding method
to be called according to the @ProduceMime specified before the method. Is
this supported? It doesn't seem to be working as expected for me.
Thanks in advance.
--
View this message in context:
http://www.nabble.com/%40ProduceMime-support-tp15043754p15043754.html
Sent from the cxf-user mailing list archive at Nabble.com.