Software AG Products 10.7 | Integrating On-Premises and Cloud Applications | Service Development | Performing Data Validation | Validation Exceptions
 
Validation Exceptions
If you use the pub.schema:validate and pub.schema:validatePipeline services to perform data validation, you can determine whether the service should succeed or fail if the data being validated is invalid. You might want a service to succeed even if the data is invalid. In the pub.schema:validate and pub.schema:validatePipeline services, the value of the failIfInvalid input variable determines whether a service fails because of an invalid object.
If the pub.schema:validate and pub.schema:validatePipeline service fails, Integration Server throws a validation exception. A validation exception is generated if one of the following is true:
*Errors are detected in the object (XML node, pipeline, or document (IData object)) that is passed (for example, null value).
*The basic validation contract is violated (for example, a binary tree is passed instead of a document (IData object) as expected).
*You specify that the service should fail if the object to be validated (XML node, pipeline, or document (IData object)) did not conform to the IS schema or IS document type (for example, failIfInvalid = true). If this is the reason for the exception, Integration Server inserts the validation errors into the exception message.