• 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
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

overriding the web service validation message

 
Ranch Hand
Posts: 312
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
All,

I have implemented web service schema validation in our web service project. We have implemented a web service handler class, xml handler chain and added annotations in the web service class. All this works fine and I am able to see the schema validation in action.
However one question I have is how can I override the validation message which is generated out of the box. I want to provide for a more user intuitive message in the error say something like if column DOB is missing then I want to state the error message saying DOB is missing from the input rather than something cryptic in xml jargon.

Let me know your thoughts.

Thanks

 
Ranch Hand
Posts: 2198
1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi!
Have you had a look at the interface org.xml.sax.ErrorHandler?
If you use a javax.xml.validation.Validator, you can set a custom error hander and receive notifications of validation errors and generate your own messages.
I am not sure that you will receive the detailed information you are looking for, but you can give it a try.
Best wishes!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic