This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Web Services and the fly likes Can wadl be used to validate rest request? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Web Services
Bookmark "Can wadl be used to validate rest request?" Watch "Can wadl be used to validate rest request?" New topic
Author

Can wadl be used to validate rest request?

john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
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: 41155
    
  45
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?


Ping & DNS - my free Android networking tools app
john mattucci
Ranch Hand

Joined: Nov 03, 2000
Posts: 331
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>

Thanks
 
Don't get me started about those stupid light bulbs.
 
subject: Can wadl be used to validate rest request?
 
Similar Threads
Servlet Response Object
Create a WebService (REST) using WSDL
Is understanding of WADL required for SCDJWS 5 or SCDJWS 6?
What is WADL
RESTful Web Service using tomcat