• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Can wadl be used to validate rest request?

 
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Master Rancher
Posts: 43045
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
john mattucci
Ranch Hand
Posts: 331
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic