users@jersey.java.net

Re: [Jersey] Json representation in google app engine

From: Rahul Juneja <rahul.juneja_at_gmail.com>
Date: Wed, 19 May 2010 17:10:35 -0400

Thanks Paul, It does work.

Thanks,
Rahul

----------------------------------------------------------
Rahul Juneja
http://techlabs.thoughtclicks.com


On Wed, May 19, 2010 at 12:51 PM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:

>
> On May 19, 2010, at 6:34 PM, Rahul Juneja wrote:
>
> Paul,
>
>
> Have you included the JSON dependencies?
>
> What jars are you using?
>
>
> I am using Jersey 1.1.5 whereas the document refers to 1.2. so i cannot
> find JSONJAXBContext class in my version. Also as per the documents 1.1.5 is
> supported on GAE/J
>
>
> See:
>
> https://jersey.dev.java.net/nonav/documentation/1.1.5/user-guide.html
> #d4e1218
>
> the same documentation applies as for 1.2.
>
> GAE/J is supported as long as you stick to the white list of classes. I
> think JSON should work as the classes in the dependent jars are not
> dependent on any black listed functionality.
>
> Paul.
>
> Any clues or help is highly appreciated.
>
> Thanks,
> Rahul
>
> ----------------------------------------------------------
> Rahul Juneja
> http://techlabs.thoughtclicks.com
>
>
> On Wed, May 19, 2010 at 11:39 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
>
>> Hi,
>>
>> Have you included the JSON dependencies:
>>
>> https://jersey.dev.java.net/nonav/documentation/latest/user-guide.html
>> #d4e1606
>>
>> ?
>>
>> Paul.
>>
>> On May 19, 2010, at 5:30 PM, Rahul Juneja wrote:
>>
>> I was trying to return json in google app engine and is says Mime type not
>> supported. What can be the possible reason.
>>
>> My exception & code i am using is as follows.
>>
>>
>> ****************************************************************************
>> *Exception*
>> SEVERE: A message body writer for Java type, class
>> com.thoughtclicks.vo.ApplicationResponse, and MIME media type,
>> application/json, was not found
>>
>> *My Code: is as follows.*
>>
>> @GET
>> @Produces("application/json")
>> public ApplicationResponse translate(@QueryParam("msisdn") String url) {
>> ApplicationResponse appResponse = new ApplicationResponse();
>> appResponse.setResponse("Some String");
>> return appResponse;
>>
>> }
>>
>>
>> Also, when i return xml it just works fine.
>>
>> Any help on this is appreciated.
>>
>> Thanks,
>> Rahul
>> ----------------------------------------------------------
>> Rahul Juneja
>> http://techlabs.thoughtclicks.com
>>
>>
>>
>
>