users@jersey.java.net

Query on jersey

From: S, Shamsudeen <shamsudeen.s_at_capgemini.com>
Date: Thu, 28 Oct 2010 12:54:38 +0530

Hi,

I am implementing jersey restful web service to get application/json mime type from the java bean classes. Given below is the resource class code
@GET
    @Produces({"application/json"})
    public synchronized Flights getFlightList() {
        return myFlights;
    }
Here if the return object (Flight) converts to json object only when the Flight encoding with jaxb. For normal POJO classes it not returning anything instead of Http error"500" is coming.

Can you please tell me is it possible to send normal java bean object as json format? If yes what are the procedures to follow to achieve the same?
Thanks and regards,

Shamsudeen
(cub)4B - 3rd - 3240
(ext) 8040261

</PRE><p style="font-family:arial;color:grey" style="font-size:13px">This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.</p><PRE>