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

Parse Xml Rules are not working as expected

SA-53572

Summary



User is using Pega 7.1.9 and reported that the Parse XML rule generated after consuming the XSD fails to parse the Request XML that the Pega SOAP Service receives.


Error Messages



Not Applicable


Steps to Reproduce

  1. Use the Connect & Metadata Wizard to consume the XSD file.
  2. Select "Get" as the element name and then select Class, Property and XML Parse rule type option.
  3. Generate the rules.
  4. Run the Parse XML rule and parse the provided request XML.
  5. Note that the request XML is not parsed by the Parse XML rule although no errors are observed in the logs.


Root Cause



An issue in the custom application code or rules is identified as root cause. 

When the mapping mode for elements in data mapping rules is set as Standard and the elements are marked as Optional, Pega does not map the elements to clipboard unless there is a value for those elements.

But if the mapping mode is set as "Literal XML" for an optional element, Pega will take the element and in value field it will put that element as xml tag, that is, if the element has a value then Pega parse and put the element along with it's value as xml tag and if the element does not have value then it will just put the element as xml tag.

Screenshot of clipboard mapping is provided below for an element marked as optional and whose mapping mode is set as "Literal XML":

In this use case, the mapping mode for some of the optional elements was set to standard due to which the elements were getting ignored during parsing whenever it didn't have any values. The parsing logic in the application was instead expecting the elements to be parsed as xml tag in value field which was causing the failure in the application.  

Resolution



Perform the following local-change:

Set the mapping mode of elements in data mapping rule to Literal XML if the expectation is to parse the elements as xml tag in the value field.

Published July 23, 2018 - Updated October 8, 2020

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