Parse XML rule is searched in wrong class when call from another
Parse XML rule created using connector and meta -data wizard is of complex type. Hence, element substitution occurs in the rule.
When the Parse rule parses one of its elements which is of substitution type, the corresponding Parse rule is searched in an incorrect class. Hence, rule resolution error occurs.
When mapping the response for a Parse-XML rule, the mapping searches an unspecified class instead of the context class. Hence, the correct rule is not selected at runtime.
Failed to open Rule-Parse-XML
Steps to Reproduce
- Provide a valid WSDL file to run the Connector and Metadata wizard (all XSD's should be available in the server).
- Create Request and Response data transforms.
- Run the connector.
The current application design does not support the following use case.
Usecase: Element substitution is configured for multiple nodes in the same level. There are only two namespaces and all substitutable nodes share the same namespaces. Additionally, the substitutable node name is the same as the actual node.
The namespace of each node is the same, that is, urn:ifxforum-org:XSD:1. For element substitution, the same namespace is used, that is, http://www.fnf.com/xes. Since Pega does not have 1 to 1 mapping of element to substitutable type, the code searches for the parse XML in the incorrect class. This occurs because it starts from the first element from the response and tries to get the first correct match.
For example, Response XML,
In this example, AcctKeys and AcctInfo have element substitution configured and do not have any explicit namespaces (xmlns) defined. At runtime, for AcctKeys, parse XML rule AcctKeys class is executed. However, for AcctInfo, since it starts to search for the node from the top (parent element), during traversing AcctInfo again fetches the AcctKeys class. As a result, it displays Cannot find Parse rule.
As a local-change, modify the namespace used in the individual Parse XML rule such that when corresponding elements in the XML do not have xmlns defined, the Parse rule can resolve the class.
0% found this useful