Ron, thanks for the reply. We figured out that having XML in the Produces clause appears to be causing this issue. Our plan is to remove that clause, and just allow JSON. When we do that, the method works without error.
-- Guy Rouillier ------ Original Message ------ From: "Ron Sigal" <[email protected]> To: [email protected] Sent: 5/11/2015 8:53:03 PM Subject: Re: [Resteasy-users] Client proxy issue deserializing Response.Status
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 getSEVERE: 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 ErrorIs 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 [email protected] https://lists.sourceforge.net/lists/listinfo/resteasy-users
--- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/resteasy-users
