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
- Generate a Parse XML Rule and corresponding Classes from an XSD file.
- Navigate to Configure > Integration > Connectors > Connector and Metadata Wizard (legacy)
- Set the Purpose to Generate Data Mapping Rules.
- Set Metadata Type to XSD.
- Select the Local File Name.
- Include the path to XSD in the Local File Name.
- Select the Element Name.
- Click the Select All button on the Select Rule Type screen.
- Click Next.
- Click Finish.
- In the XML tab of the generated Parse XML Rule,
- Set the Schema XML to the XSD file path.
- Set the Perform Validation to Always.
- Set the Schema Type to XSD.
- Set On Error to Add Page Message.
- Execute the generated Parse XML Rule.
- Pass the rule an XML file with a field that violates an XSD validation which works correctly.
- 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
Have a question? Get answers now.
Visit the Collaboration Center to ask questions, engage in discussions, share ideas, and help others.