Support Article

Value of fields in SOAP response is changed by Parse XML

SA-48185

Summary



Value of fields in SOAP response is changed by Parse XML

User is updating from  Pega 7.1.8 to  Pega 7.3 and is using SOAP connector to fetch data from external system.

When the response XML is being parsed, user is observing that some of the values get changed.

For example:

(1) In response user is getting <PARTY_ID>26472076</PARTY_ID>, but after parsing, the value is being converted to 2.6472076E7.
(2) In response user is getting <NUMBER_UNBILLED_STREAMS>25</NUMBER_UNBILLED_STREAMS>, but after parsing the value is being converted to 25.0.

In XSD the type of the field is defined as 'Double', but this conversion of values did not happen in  Pega 7.1.8.

This is resulting in data being processed in incorrect format.



Error Messages



Not Applicable


Steps to Reproduce



1. Consume a service whose data definition (XSD) has fields marked as Double.
2. Invoke the Connect-SOAP rule and check the clipboard for the response.


Root Cause



In Pega 7.3 a correction was made to parsing of XML so defined elements as double were converted to double when mapping data to the clipboard.

Prior to Pega 7.3 the parsing of XML defined double elements were converted to integer when mapping data to the clipboard, this was not correct behavior. 
 

Resolution



Correcting the WSDL so that data types match those that user wants to use in PRPC would be the best option.

However, there are two are two ways to solve this no changes to the XSD/WSDL definitions.
  •  Dynamic System Setting: 
Purpose : SwitchToOldAssembler
Owning Ruleset : Pega-IntegrationEngine
Value : true

This will go back to an older assembler for parsing XML data, only affects XML parsing, and will map defined double elements as integers. 
 
  • During the import of the XSD the elements defined as double were added as property rules with a type of “Decimal”.
    Change these properties to use a type of Integer. 


 

Suggest Edit

Published July 23, 2018 - Updated October 8, 2020

Have a question? Get answers now.

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