This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
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
Thank you
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35237
7
posted
0
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?
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
<unsupportedQueryParameter>
One of the query parameters specified in the request URI is not supported.
</unsupportedQueryParameter>