Use validation rules to check if the data is in line with the defined standards.
To validate data, you can use several validation types. This topic explains how to set up the Web service validation type.

Use a web service validation to validate if a field value matches a value in another internal or external source, using a web service.
Before you can set up a web service validation rule, set up the web service to be used.

Data quality administrator Data quality administrator Developer Developer Start Start Need a new custom  request or response  handler class? Need a new custom  request or response  handler class? Inform the developer on the  request or response handler  class to be developed Inform the developer on the  request or response handler  class to be developed Develop custom response or request handler class Develop custom response or request handler class   For a web service, you can use a custom class to define the: Request that you send to the web service. You can, for example, use a custom class to add some binary code or other logic to the web service request. Use the PostData method to define web service requests. Response that you expect from the web service. You can, for example, use a custom class to add some binary code or other logic to the web service response. Use the parseResponse method to define web service response. The custom class must extend the DQSWebServiceCustomFormatBase base class. Inform the data quality  administrator that the request  or response handler class  is available Inform the data quality  administrator that the request  or response handler class  is available Need new web service? Need new web service? Set up web service Set up web service You can use a web service in:A validation rule to validate if a field value matches a value in another internal or external source.An action rule to fill a field value with a value from another internal or external source.To set up a web service validation rule or action rule, first set up the web service to be used.You can find most of the required values to be set for the web service in the technical documentation as shared by the web service provider. Procedure 1. Click Data quality management. 2. Click Web services. 3. Click New. 4. In the Web service field, type a value. 5. In the Description field, type a value. 6. In the Web Service URL field, enter the URL of the web service. 7. In the Certificate field, enter or select a value. 8. Sub-task: Define web service settings. 9. Expand the Settings section. 10. In the Request method field, type a value. 11. In the Content type field, type a value. 12. You can use a custom class to define the request that you send to the web service. You can, for example, use a custom class to add some binary code or other logic to the web service request. The custom class must extend the DQSWebServiceCustomFormatBase base class. Use the PostData method to define web service requests. In the Custom request handler field, enter or select a value. Note: - You can use a custom class both for SOAP and non-SOAP. - In the lookup of this field, only the classes are shown that extend the DQSWebServiceCustomFormatBase base class. - You can use the same custom class for request and response. - If you use a custom class in the Request data provider field, the Input parameters must be defined in the custom class. So, you cannot define Input parameters for the web service. 13. In the Accept field, type a value. 14. In the Accept encoding field, type a value. 15. You can use a custom class to define the response that you expect from the web service. You can, for example, use a custom class to add some binary code or other logic to the web service response. The custom class must extend the DQSWebServiceCustomFormatBase base class. Use the parseResponse method to define web service response. In the Custom response handler field, enter or select a value. Note: - You can use a custom class both for SOAP and non-SOAP. - In the lookup of this field, only the classes are shown that extend the DQSWebServiceCustomFormatBase base class. - You can use the same custom class for request and response. - If you use a custom class in the Response parser field, the Output parameters must be defined in the custom class. So, you cannot define Output parameters for the web service. 16. Select Yes in the Use SOAP envelope field. 17. If the web service access type is SOAP, enter the required SOAP segments and schema as provided by the web service. Also enter the parameters in the message body. If you send a request, the parameter values are added to the parameters in the body in the message pattern. In the Message pattern field, type a value. Note: - You can only define a message pattern if the content type is 'application/xml'. - Make sure to define the request parameters in the Parameters section or in the Custom request handler. 18. Sub-task: Define web service parameters. 19. Every web service requires parameters. The parameters define the web service values that are used to validate or set a D365 FO value. Expand the Parameters section. Note: - If you use a custom handler for the request or response, the parameters must be defined in the custom handler. - If the web service: - Uses SOAP, the parameter values are added to the parameters in the body in the message pattern. - Does not use SOAP, the parameters and parameter values are added to the web service URL. 20. Click New. 21. In the Parameter name field, type a value. 22. Define when the parameter is applied: - Request: Defines what you send to the web service. So, it is the input for the web service. - Response: Defines what you get from the web service. So, it is the output from the web service. In the Direction field, select an option. Note: If you have defined a: - Custom request handler, you cannot set up Request parameters. - Custom response handler, You cannot set up Response parameters. 23. In the Parameter value field, type a value. 24. You can use secured values to store secrets at a central place in Data quality studio. You can, for example, set up a secured value for a license key or access token. You can use a secured value as a request parameter value to get access to a web service. In the Secured value field, enter or select the desired secured value. Note: - Use secured values only for parameters with the direction 'Request'. - If you use a secured value, do no fill in the Parameter value field. 25. If the web service type is SOAP, in a web service message, a parameter can be used several times in different locations. You can use a path expression to define the exact location in the web service message to enter or find applicable value. In the Path expression field, type a value. Note: You can only define a path expression if the content type is 'application/xml'. 26. Sub-task: Make web service active. 27. If the web service setup is completed, you can make the web service active. As a result, it becomes available for selection for validation rules and action rules. Select Yes in the Active field. Note: If active and used in an active data quality policy version, you cannot make the web service inactive. 28. Close the page. Need new custom  parameter value class? Need new custom  parameter value class? Inform the developer on  the parameter value class  to be developed Inform the developer on  the parameter value class  to be developed Develop custom parameter value class Develop custom parameter value class To define a web service parameter value, you can use a custom class to return a parameter value.You can use a custom parameter value class to return web service parameters for validation rules and action rules of type Web service. The custom parameter value class must extend the DQSWebServiceParametersBase base class. This custom class must have at least one return method that returns a value. Inform the data quality  administrator that the  parameter value class  is available Inform the data quality  administrator that the  parameter value class  is available Set up validation rule of type Web service Set up validation rule of type Web service Use validation rules to check if the data is in line with the defined standards. To validate data, you can use several validation types. This topic explains how to set up a validation rule of type Web service validation type. Use a web service validation rule to validate if a field value matches a value in another internal or external source, using a web service. You can, for example, use a web service validation rule to validate an address, email, or VAT number. Before you can set up a web service validation rule, set up the web service to be used. You can set up a web service validation rule in several ways. For a parameter of type: Request, you can use the default parameter values as defined for the used web service. No specific parameter setup is required. Request, you can override a default parameter value for a request parameter. To do so, you can use the type Field, Code, or Fixed value. Each type requires specific settings. Explained in subtasks 10-12. Response, you can use the values, as returned by the web service, to validate a value in D365 FO. Explained in subtask 13. Response, you can process a response value, as returned by the web service, before you use it to validate a value in D365 FO. Explained in subtask 14   Procedure 1. Click Data quality management. 2. On the Data quality policies tab, in the list, click the link of the desired data quality policy. 3. On the Validation rules tab, click Add. Note: If you want to edit another data quality policy version than the currently shown version, first select the desired version. To do so, on the Action Pane, on the Version tab, click Versions. On the dialog, select the desired version and click OK. 4. In the Table field, enter or select a value. 5. Define the field which value must be validated. In the Field field, enter or select a value. Note: If, on validation, the defined field does not have a value, the web service validation rule is not applied. 6. In the Validation type field, select 'Web service'. 7. In the Event field, select an option. 8. Define what is done if the validation rule is not met: - Warning: A warning message is shown. The record or the field value is saved. - Error: An error message is shown. The record or the field value is not saved. In the Warning/Error field, select an option. Note: For each validation rule, you can define a message to be shown. If you do not define a validation rule message, a default message is shown. 9. On the Properties tab, in the Web service field, enter or select the desired web service. 10. Sub-task: Set up a request parameter override of type Field. 11. For a web service, parameters can be set up. If so, these parameters are shown on the Properties tab. For Request parameters, a default value can be defined. You can override this default value with the value of a field. If no default value is defined, do the same steps to define the request parameter value. On the Properties tab, for the desired Request parameter, select the Override setup check box. Note: If a Custom request handler is defined for the web service, no Request parameters are available. 12. In the Parameter type field, select 'Field'. 13. In the Field name field, enter or select a value. Note: You can only select a field from the table that is defined for the validation rule. 14. Sub-task: Set up a request parameter override of type Custom. 15. For a web service, parameters can be set up. If so, these parameters are shown on the Properties tab. For Request parameters, a default value can be defined. You can override this default value with a value that is defined by a custom method. If no default value is defined, do the same steps to define the request parameter value. On the Properties tab, for the desired Request parameter, select the Override setup check box. Note: If a Custom request handler is defined for the web service, no Request parameters are available. 16. In the Parameter type field, select 'Code'. 17. Define the custom class that is used to define the parameter value. In the Class name field, enter or select a value. Note: You can only select classes that extend the DQSWebServiceParametersBase base class. This custom class must have a return method that returns a value. 18. In the Method name field, enter or select a value. 19. Sub-task: Set up a request parameter override of type Fixed value. 20. For a web service, parameters can be set up. If so, these parameters are shown on the Properties tab. For Request parameters, a default value can be defined. You can override this default value with a fixed value. If no default value is defined, do the same steps to define the request parameter value. On the Properties tab, for the desired Request parameter, select the Override setup check box. Note: If a Custom request handler is defined for the web service, no Request parameters are available. 21. In the Parameter type field, select 'Fixed value'. 22. In the Parameter value field, type a value. 23. Sub-task: Set up response parameter. 24. For a web service, parameters can be set up. If so, these parameters are shown on the Properties tab. Indicate which response parameters are used to validate the value. For each of these parameters, set up a condition to define which response values from the web service are valid. A condition has a type and a value. For each of the used response parameters, the condition must be met. On validation, the process is: 1. Send request to web service. 2. Web service gives response values. 3. Apply the condition for each used response value. Result: The validation rule is only met if for each used response parameter, the condition is met. Select the Use as response parameter check box. Note: If a Custom response handler is defined for the web service, no Response parameters are available. 25. In the Condition type field, select an option. 26. In the Parameter value field, type a value. 27. Sub-task: Set up response parameter override. 28. For a web service, parameters can be set up. If so, these parameters are shown on the Properties tab. You can process a Response value, as received from the web service, before you use it to validate a value in D365 FO. You can only do so with a custom class and method. On validation, the process is: 1. Send request to web service. 2. Web service gives a response. 3. Process response with custom method. 4. Get response from custom method. 5. Apply the condition for each used response value. Result: The validation rule is only met if for each used response parameter, the condition is met. On the Properties tab, for the desired Response parameter, select the Override setup check box. Note: - Select this check box for each response parameter for which you also select the Use as response parameter check box. - If a Custom response handler is defined for the web service, no Response parameters are available. 29. Indicate which response parameters are used to validate the value. For each of these parameters, set up a condition to define which response values from the custom method are valid. A condition has a type and a value. For each of the used response parameters, the condition must be met. Select the Use as response parameter check box. Note: Select this check box for each response parameter for which you also select the Override setup check box. 30. Define the custom class that is used to process the web service response and that returns the value that is used as input for the condition. In the Class name field, enter or select a value. Note: You can only select classes that extend the DQSWebServiceParametersBase base class. This custom class must have a return method that returns a value. 31. In the Method name field, enter or select a value. 32. In the Condition type field, select an option. 33. In the Parameter value field, type a value. 34. Close the page. End End Yes No Yes No Yes No

Activities

Name Responsible Description

Develop custom response or request handler class

Developer

 

For a web service, you can use a custom class to define the:
  • Request that you send to the web service. You can, for example, use a custom class to add some binary code or other logic to the web service request. Use the PostData method to define web service requests.
  • Response that you expect from the web service. You can, for example, use a custom class to add some binary code or other logic to the web service response. Use the parseResponse method to define web service response.
The custom class must extend the DQSWebServiceCustomFormatBase base class.

Set up web service for Data quality studio

Data quality administrator

You can use a web service in:
  • A validation rule to validate if a field value matches a value in another internal or external source.
  • An action rule to fill a field value with a value from another internal or external source.
To set up a web service validation rule or action rule, first set up the web service to be used.
You can find most of the required values to be set for the web service in the technical documentation as shared by the web service provider.

Develop custom parameter value class

Developer

To define a web service parameter value, you can use a custom class to return a parameter value.
You can use a custom parameter value class to return web service parameters for validation rules and action rules of type Web service. 
The custom parameter value class must extend the DQSWebServiceParametersBase base class. This custom class must have at least one return method that returns a value.

Set up validation rule of type Web service

Data quality administrator

Use validation rules to check if the data is in line with the defined standards.
To validate data, you can use several validation types. This topic explains how to set up a validation rule of type Web service validation type.

Use a web service validation rule to validate if a field value matches a value in another internal or external source, using a web service.
You can, for example, use a web service validation rule to validate an address, email, or VAT number.
Before you can set up a web service validation rule, set up the web service to be used.
You can set up a web service validation rule in several ways. For a parameter of type:
  • Request, you can use the default parameter values as defined for the used web service. No specific parameter setup is required.
  • Request, you can override a default parameter value for a request parameter. To do so, you can use the type Field, Code, or Fixed value. Each type requires specific settings. Explained in subtasks 10-12.
  • Response, you can use the values, as returned by the web service, to validate a value in D365 FO. Explained in subtask 13.
  • Response, you can process a response value, as returned by the web service, before you use it to validate a value in D365 FO. Explained in subtask 14
 

Activities

Name Responsible Description

Develop custom response or request handler class

Developer

 

For a web service, you can use a custom class to define the:
  • Request that you send to the web service. You can, for example, use a custom class to add some binary code or other logic to the web service request. Use the PostData method to define web service requests.
  • Response that you expect from the web service. You can, for example, use a custom class to add some binary code or other logic to the web service response. Use the parseResponse method to define web service response.
The custom class must extend the DQSWebServiceCustomFormatBase base class.

Set up web service for Data quality studio

Data quality administrator

You can use a web service in:
  • A validation rule to validate if a field value matches a value in another internal or external source.
  • An action rule to fill a field value with a value from another internal or external source.
To set up a web service validation rule or action rule, first set up the web service to be used.
You can find most of the required values to be set for the web service in the technical documentation as shared by the web service provider.

Develop custom parameter value class

Developer

To define a web service parameter value, you can use a custom class to return a parameter value.
You can use a custom parameter value class to return web service parameters for validation rules and action rules of type Web service. 
The custom parameter value class must extend the DQSWebServiceParametersBase base class. This custom class must have at least one return method that returns a value.

Set up validation rule of type Web service

Data quality administrator

Use validation rules to check if the data is in line with the defined standards.
To validate data, you can use several validation types. This topic explains how to set up a validation rule of type Web service validation type.

Use a web service validation rule to validate if a field value matches a value in another internal or external source, using a web service.
You can, for example, use a web service validation rule to validate an address, email, or VAT number.
Before you can set up a web service validation rule, set up the web service to be used.
You can set up a web service validation rule in several ways. For a parameter of type:
  • Request, you can use the default parameter values as defined for the used web service. No specific parameter setup is required.
  • Request, you can override a default parameter value for a request parameter. To do so, you can use the type Field, Code, or Fixed value. Each type requires specific settings. Explained in subtasks 10-12.
  • Response, you can use the values, as returned by the web service, to validate a value in D365 FO. Explained in subtask 13.
  • Response, you can process a response value, as returned by the web service, before you use it to validate a value in D365 FO. Explained in subtask 14
 

See also

Provide feedback