Reputation: 1741
Tech Stack: Java 1.6, JPA (Hibernate 3), Spring 3, Oracle 11g, JAX-RS (RESTEasy)
Hello,
I am writing few RESTful web-services. I am using RESTEasy..
What I am not sure about is how can I validate the JSON \ XML request?? With SOAP it was easy and straight forward.
After searching, I could not find anything which clearly states what needs to be done. I found a post (this) which mentioned about using MessageBodyReader, but I am not sure how to do it.
Thanks
Upvotes: 2
Views: 1351
Reputation: 1741
Got this to work.
the post quoted in the question does answer this qustion. what I was not sure was not to hook the reader to the code, but that is done automatically using the @Provider annotation.
Upvotes: 2