This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Web Services and the fly likes Return primitive Wrapper types for jersey - Restful Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Return primitive Wrapper types for jersey - Restful" Watch "Return primitive Wrapper types for jersey - Restful" New topic
Author

Return primitive Wrapper types for jersey - Restful

Anish Shah
Greenhorn

Joined: Sep 24, 2008
Posts: 20
One of the links i found

best practice to return primitive types

Right now, i have been stuggling to find a simple way to return a primitive type or its Wrapper class. Wrapper classes like Integer, Long are throwing RunTimeExceptions as they don't annotate @XmlRootElement


Exception thrown at runtime :




I want to know how could i return a Wrapper class like below :



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Return primitive Wrapper types for jersey - Restful
 
Similar Threads
Returning a String from Server (REST) and getting Errors..
Web Service For Optical Character Recognition
REST Web Services using jersey in Apache Tomcat Server throwing ConnectionException
Jersey Hibernate Problem
Jersey Response issue driving me batty!