Support Article
Default value in XSD not applied in XML Stream for PRPC 6.3 SP1
SA-7949
Summary
The reported is an integration issue. When running the Connector & Metadat Wizard, generated XML Stream rule does not include the default value defined in XSD.
Sample XSD:
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="shiporder">
<xs:complexType>
<xs:sequence>
<xs:element name="AdditionalIncome" type="xs:decimal" default="3"/>
<xs:element name="orderperson" type="xs:string"/>
<xs:element name="shipto">
<xs:complexType>
<xs:sequence>
<xs:element name="name" type="xs:string"/>
<xs:element name="address" type="xs:string"/>
<xs:element name="city" type="xs:string"/>
<xs:element name="country" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="item" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="title" type="xs:string"/>
<xs:element name="note" type="xs:string" minOccurs="0"/>
<xs:element name="quantity" type="xs:positiveInteger"/>
<xs:element name="price" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="orderid" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
</xs:schema>
The generated XML rule does not include the Default Value as specified in the XSD.
Error Messages
Not Applicable.
Steps to Reproduce
1) Start Connector & Metadata Wizard.
2) Import the sample XSD.
3) Open the generated XML stream rule.
The default value specified in XSD is not applied.
Root Cause
The root cause of this problem is a defect in Pegasystems’ code/rules.
Resolution
Install HFix-21156.
Published June 12, 2015 - 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.