-
Bug
-
Resolution: Done
-
Major
-
Beta 8
-
None
-
None
Hi,
I'm having a problem when using the Response class. The following code
worked in 1.0-beta-5 version but no longer works after upgrading to
1.0-beta-8. The only change i made from the beta-5 version to beta-8
version is changing the @ProduceMime to @Produces. The beta-5 version
would create an xml representation of the Protocol class, which contains
jaxb annotations. However, the beta-8 version no longer creates the xml
representation, it just returns a simple string that looks something
like this, "Protocol@1253dfb". What do i need to change to get this to
work in the beta-8 version?
Thanks,
Todd
@GET
@Path("protocol/
")
@Produces("application/xml")
public Response getProtocol(@PathParam("id") Long id);
public Response getProtocol(Long id) {
Response response;
Protocol entity = protocolDAO.findById(id);
if (entity != null)
{ response = Response.ok(entity).build(); }else
{ response = Response.serverError().build(); } return response;
}