users@jersey.java.net

[Jersey] returning basic data types

From: Suchitha Koneru (sukoneru) <"Suchitha>
Date: Mon, 14 Mar 2011 15:58:57 -0700

Hello Jersey Users ,

        The following apis do not work, we are using Jersey 1.5 on
Jboss with JDK 1.6; Is there any other way of returning basic
data types (int, byte , short etc) ? I also tried changing the mime
type to application/xml which does not help.

 

 

      @GET

      @Path("testLongWrapper")

      @Produces("application/text")

      

  public Long getLongBasic(){

        return new Long(1234);

  }

 

        

 

      @GET

      @Path("testLongBasic")

      @Produces("application/text")

      

  public long getLong(){

        return new Long(1234);

  }

 

Thanks,

Suchitha