Designer 10.7 | webMethods Service Development Help | Performing Data Validation | Performing Input/Output Validation
 
Performing Input/Output Validation
 
Specifying Input/Output Validation via the Input/Output Tab
Specifying Input/Output Validation via the INVOKE Step
In input/output validation, the validation engine in Integration Server validates the inputs and/or outputs of a service against the declared input and output parameters of the service. If you specify that you want to validate the inputs to the service, the validation engine validates the service input values immediately before the service executes. If you specify that you want to validate the outputs of the service, the validation engine validates the service output values immediately after the service executes. An input or output value is invalid if it does not conform to the constraints applied to the input or output parameter.
For input/output validation, the service’s declared input and output parameters act as the blueprint or model against which input/output values are validated. To effectively use the input and output parameters as the blueprint for validation, you need to apply constraints to the parameters. For information about applying constraints to variables, see About Variable Constraints. For information about declaring service input and output parameters, see Declaring Input and Output Parameters.
Note:
The declared input and output parameters for a service are sometimes called the signature of the service.
You can specify that you want to perform input/output validation for a service in the following ways:
*Input/Output tab. Set properties on the Input/Output tab to instruct the validation engine in Integration Server to validate the inputs and/or outputs of the service every time the service executes. If a client calls the service and the inputs are invalid, the service fails and does not execute.
*INVOKE step properties. Set up input/output validation via the INVOKE step properties to instruct the validation engine to validate the service input and/or output only when it is called from within another flow service. At run time, if the inputs and/or outputs of the service are invalid, the INVOKE flow step that calls the service fails.
To determine which method to use, decide whether or not you want the service input and output values validated every time the service runs. If you want to validate the input and output values every time the service runs, specify validation via the Input/Output tab. For example, if your service requires certain input to exist or fall within a specified range of values, you might want the pipeline validated every time the service runs.
If the input and/or output values do not need to be validated every time the service executes, set up validation via the INVOKE step properties. Specifying input/output validation via the INVOKE step properties allows you to decide on a case-by-case basis whether you want validation performed
Note:
If you specify input/output validation via the INVOKE step and an input or output value is invalid, the service itself does not actually fail. The validation engine validates input values before Integration Server executes the service. If the service input is not valid, the INVOKE flow step for the service fails. Similarly, the validation engine validates output values after Integration Server executes the service. If the service output is not valid, the INVOKE flow step for the service fails. Whether or not the entire flow service fails when an individual flow step fails depends on the exit conditions for the service. For information about specifying exit conditions, see Using SEQUENCE to Specify an Exit Condition.
Related Topics
Performing Data Validation
Blueprints or Models Against which Data is Validated
Specifying Input/Output Validation via the Input/Output Tab
Specifying Input/Output Validation via the INVOKE Step
Performing Pipeline Validation
Performing Document Validation
Performing XML Validation in Integration Server
Performing Validation from within a Java Service
Validation Errors
Validation Exceptions
Validation Content Constraints