XML Validator

If we need to Validate incoming request and if the validation fails then how to send the error in response.
We have already selected Incoming request-->Payload--> XML validator.

Please help here


  • OmarROmarR Posts: 229 admin
    edited December 2017

    Good morning rashmi,

    The simplest way to do this is to chain a Text Data Bank to your XML Validator to extract the validation-result . You would then parameterize the extraction back into your responder using the ${ } syntax.

  • Ok thanks.

    now I want to validate the incoming request first and if it fails then it will return result in response(Using text data bank).
    But if the validation is successful then i want to return another response.

    What will be the solution.

  • benken_parasoftbenken_parasoft Posts: 982 ✭✭✭
    edited December 2017

    You may have to script the response. Alternatively, if you are only trying to check well-formedness, you can probably accomplish this without an XML Validator. Instead, you can rely on your responder correlation failing (since running XPaths on message body would fail in that case). Then you can have a default responder at the end of your pva that is setup like the way Omar describes.

    However, as an aside, I also want to mention that there are other mechanisms in place for monitoring validation failures and other events produced by your virtual assets. In particular, here are some sections from the docs:
    Gaining Visibility into Server Events (from Parasoft Virtualize)
    Monitoring Parasoft Virtualize Server Events (from Parasoft SOAtest)
    Reviewing Specific Event Logs (from Parasoft CTP)

Sign In or Register to comment.