I have read and attempted several of the tutorial/postings online regarding the creation of a WADL for Jersey which I was able to create. I was wondering how would I go about setting up validation of request against a WADL the way I would with SOAP/WSDL. For example if the request URL is localhost:8080?x=1&y2 and only x is a valid parameter, could the use of a WADL allow us to throw an exception. Can this even be done the way I'm thinking? I am using Jersey 1.12 + JAXB
I'm not sure I follow. That *is* a valid request - other parameters will simply be ignored. The way WSDL (and WADL) are generally used is to generate client-side code that uses just the requisite parameters (and so wouldn't send any other parameters); is that not how you are using it?
Joined: Nov 03, 2000
Currently the service can be consumed by several means thus the client might or might not use "generated client side code", thus its possible that a URL could be composed to include invalid parameters. So I was hoping there would be a way to return either a JSON/XML error like the one below in the case of a XML request
One of the query parameters specified in the request URI is not supported.