Skip to main content

This content has been archived and is no longer being updated. Links may not function; however, this content may be relevant to outdated versions of the product.

Support Article

Unable to validate data in XML that breaks XSD validation

SA-84905

Summary


Unable to validate the data present in the XML that breaks XSD validation. This occurs when Parse XML rule  is invoked from the Apply-Parse- XML activity. The validations work if the rule is executed on its own.


Error Messages



Not Applicable


Steps to Reproduce

  1. Generate a Parse XML Rule and corresponding Classes from an XSD file.
     
    1. Navigate to Configure > Integration > Connectors > Connector and Metadata Wizard (legacy)
    2. Set the Purpose to Generate Data Mapping Rules.
    3. Set Metadata Type to XSD.
    4. Select the Local File Name.
    5. Include the path to XSD in the Local File Name.
    6. Select the Element Name.
    7. Click the Select All button on the Select Rule Type screen.
    8. Click Next.
    9. Click Finish.
       
  2. In the XML tab of the generated Parse XML Rule,
     
    1. Set the Schema XML to the XSD file path.
    2. Set the Perform Validation to Always.
    3. Set the Schema Type to XSD.
    4. Set On Error to Add Page Message.
       
  3. Execute the generated Parse XML Rule.
  4. Pass the rule an XML file with a field that violates an XSD validation which works correctly.
  5. Invoke the Parse XML from the activity using the Apply-Parse-XML method. The method output returns a Fail response.


Root Cause



When the Apply-Parse-XML rule was invoked, the element name of the Parse XML rule was not set in one of the parameters.


Resolution



Perform the following local-change such that the rule is invoked and an exception displays:

Set the Element name in the parameter of the Apply-Parse-XML.

Published August 15, 2019 - Updated December 2, 2021

Was this useful?

0% found this useful

Have a question? Get answers now.

Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Community has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice
Contact us