This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Web Services and the fly likes Unable to produce JSON response for an arraylist contaning java beans Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Unable to produce JSON response for an arraylist contaning java beans" Watch "Unable to produce JSON response for an arraylist contaning java beans" New topic
Author

Unable to produce JSON response for an arraylist contaning java beans

rakesh kadulkar
Ranch Hand

Joined: Jul 24, 2008
Posts: 115
Hi,

I am new to web services so trying out the tutorials over the net.
I am using JAX-RS tutorials for myeclipse.
I have created a demo application which successfully produces XML response for a list of entities but the same application if configured to produce JSON response for list of entities it is giving below error.

"A message body writer for Java type, class java.util.ArrayList, and MIME media type, application/json, was not found"

My entity and the web service is as below.

WEB Service



Your help in this regards is appreciated.

Best Regards,
Rakesh Kadulkar

Rakesh Kadulkar
H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 418
    
    4
Should line 34 be?

rakesh kadulkar
Ranch Hand

Joined: Jul 24, 2008
Posts: 115
Great that's solved my problem.
Thank you.

- Rakesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unable to produce JSON response for an arraylist contaning java beans