samedi 25 juillet 2015

page not found when testing jax-rs restful services that produce or consume json

Background- I've been trying to teach myself how to use basic restful services using JEE (jax-rs alone no jersey) and Glassfish (Netbeans) for the server side of an android app.

Problem- So far creating multiple simple root resources that return "text/plain" worked fine but whenever I create a resource that has @produce or @consume "application/json" testing from within netbeans using the test webservices or from my app or just hitting the path in my browser I get a 404 error.

I've read other posts suggesting issues with the web.xml file. I do not have that file in my project, instead I have an Application subclass that adds all my rest resources.

Any pointers would be greatly appreciated, this is the beginning of my journey so please bare with me and my silly question.

Thanks!

Aucun commentaire:

Enregistrer un commentaire