• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unable to produce JSON response for an arraylist contaning java beans

 
rakesh kadulkar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
H Paul
Ranch Hand
Posts: 471
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Should line 34 be?

 
rakesh kadulkar
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great that's solved my problem.
Thank you.

- Rakesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic