From: Ron S. <rs...@re...> - 2015-05-12 00:53:15
|
Hi Guy, Maybe there's a problem with the media type produced by your resource method. The attached TestResponseStatus works for me. However, when I comment out the @Produces annotation: > @Path("/") > public static class TestResourceImpl > { > @POST > @Path("post") > // @Produces("text/plain") > public Response.Status post() > { > return Response.Status.OK; > } > } I get > SEVERE: Failed executing POST /post > org.jboss.resteasy.core.NoMessageBodyWriterFoundFailure: Could not > find MessageBodyWriter for response object of type: > javax.ws.rs.core.Response$Status of media type: application/octet-stream > at > org.jboss.resteasy.core.ServerResponseWriter.writeNomapResponse(ServerResponseWriter.java:67) > at > org.jboss.resteasy.core.SynchronousDispatcher.writeResponse(SynchronousDispatcher.java:427) > at > org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:376) > at > org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179) > at > org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220) > at > org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56) > at > org.jboss.resteasy.plugins.server.tjws.TJWSServletDispatcher.service(TJWSServletDispatcher.java:40) > at > org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) > at Acme.Serve.Serve$ServeConnection.runServlet(Serve.java:2331) > at Acme.Serve.Serve$ServeConnection.parseRequest(Serve.java:2285) > at Acme.Serve.Serve$ServeConnection.run(Serve.java:2057) > at Acme.Utils$ThreadPool$PooledThread.run(Utils.java:1402) > at java.lang.Thread.run(Thread.java:745) > > status: Internal Server Error Is that what you are seeing? -Ron On 05/04/2015 03:01 PM, Guy Rouillier wrote: > We have a webservice POST method that returns a Response.Status object > as the entity. I've debugged this running method to verify that the > return value is Response.Status.OK. > > We use the RestEasy client proxy to invoke our webservice methods. The > approach works well for us, and our developers find the approach easy to > use. However, in this case, the proxy is deserializing this return > object as Response.Status.INTERNAL_SERVER_ERROR. > > Any idea on why this would happen? > > Thanks. > > -- > Guy Rouillier > > > --- > This email has been checked for viruses by Avast antivirus software. > http://www.avast.com > > > ------------------------------------------------------------------------------ > One dashboard for servers and applications across Physical-Virtual-Cloud > Widest out-of-the-box monitoring support with 50+ applications > Performance metrics, stats and reports that give you Actionable Insights > Deep dive visibility with transaction tracing using APM Insight. > http://ad.doubleclick.net/ddm/clk/290420510;117567292;y > _______________________________________________ > Resteasy-users mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/resteasy-users |