Results 1 to 2 of 2

Thread: validation at the data tier

  1. #1
    Join Date
    Aug 2007
    Posts
    22

    Default validation at the data tier

    I have a bean that is populated in another tier and sent to me via web services. I am responsible for verifying the bean before persisting it. I would like to use spring validation where I will be responsible for calling validate() on the Validator implementation and passing in an Errors implementation to the validate() call. What Errors implementation should I use? Should I create my own?

    Thanks in advance...

  2. #2
    Join Date
    Aug 2007
    Posts
    22

    Default

    I think I've found how to use the validator without the MVC framework:

    BindException validatePersonWebServiceMethod(Person person) {

    ...
    Validator validator = new PersonValidator();
    BindException errors = new BindException(person, "target");
    ...
    validator.validate(person, errors);
    ...
    return errors;
    }

    The only thing I need to do is to work out how to send a BindException via. the webservice. Any suggestions?

    Thanks in advance ...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •