I am developing RESTEasy Example. In this example I am using all latest dependencies and deploying om tomcat 8.x version. I can successfully deploy the applicat
Now I am able to solve this issue. I need to add following dependency in pom.xml
:
org.jboss.resteasy
resteasy-jaxb-provider
3.0.16.Final
And 1) I should be using @Produces(MediaType.APPLICATION_XML)
on method signature to get following response.
0
Ricky
AOHP451
1
Mayer
DKLP987
2) If you want to use @Produces(MediaType.TEXT_PLAIN)
then code will gives you following output which doesn't looks useful.
[com.mkyong.rest.Student@4d5fd75e, com.mkyong.rest.Student@7715574d]
So use 1) solution.