You can set up data quality policy rules that use a web service.

You can 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.
  • Enrichment rule to get a field value from another internal or external source, using a web service, and set this value in the target field of the enrichment rule.
  • Action rule to get a field value from another internal or external source, using a web service, and set this value in the target field of the enrichment rule.
Before you can set up a web service rule, set up the web service configuration to be used.


Data quality administrator Data quality administrator The data quality administrator (DQSDataQualityAdministrator) can set up and maintain: Data quality policies Data quality studio parameters Data quality studio general setup 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 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 F&SCM 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 not 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 Test web service configuration Test web service configuration You can test a web service configuration. When you test the web service configuration, this is tested: Connection to the web service. Request that is sent to the web service. Response that is received from the web service. Procedure 1. Click Data quality management. 2. Click Web services. 3. In the list, find and select the desired web service. 4. Expand the Web service test section. 5. Click New. 6. In the Test scenario name field, type a value. 7. In the Expected field, select an option. 8. Click Save. 9. Sub-task: Configure the web service test. 10. Click Setup test. 11. In the Request parameters section, click Add. 12. In the Parameter name field, enter or select a request parameter. 13. In the Parameter value field, type a value. 14. In the Expected response section, click Add. 15. In the Parameter name field, enter or select a response parameter. 16. In the Condition type field, select an option. 17. In the Parameter value field, type the condition value with which the response value must be compared. 18. Click Close. 19. Test the web service configuration. Click Execute test. Note: As a result of the test, these fields are set: Actual: Indicates if the test passed or failed. You can compare this with the defined expected result. Last run date time: The date and time the test was last done. 20. Sub-task: Analyze web service test response. 21. The last web service response is stored. You can analyze it, for example, if the expected test result and actual test result are different. Click Web service response. Note: The web service response is shown in XML format. 22. Click Close. 23. Close the page. End End 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

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.

Test web service configuration

Data quality administrator

You can test a web service configuration.

When you test the web service configuration, this is tested:

  • Connection to the web service.
  • Request that is sent to the web service.
  • Response that is received from the web service.

Provide feedback