search cancel

TDM: remove <MyInfo/> tag, from publish, when there is no data

book

Article ID: 190630

calendar_today

Updated On:

Products

CA Test Data Manager (Data Finder / Grid Tools)

Issue/Introduction

The publish generates the <MyInfo/> tag, but we need to have the tag removed when there is no data, because our application will reject the tag.

What TDM Portal log(s) in debug mode do you need?  I have no access to copy the logs from the server.  I can only cut and paste content from the log files.  I also have to scrub the log content. 

 

I can’t send the actual XML, XSD nor screen captures but sent samples that are scrubbed below with the relevant information.

 

FYI: MyInfo table exists in the XML if a calculated field in another table is greater than zero.

 

TDM Table: MyInfo

 

  1. TDM Data Painter:RoutNo

Datatype : string

Nullable : False

Validation Rules:   pattern : (01|02|03|04|05|06|07|08|09|10|11|12|21|22|23|24|25|26|27|28|29|30|31|32)[0-9]{7}

Function:  @if(1=2,~NOVALUE~,027100238)@

 

  1. TDM Data Painter:OtherCD

Datatype : string

Nullable : True

Validation Rules:   enumeration : Other

 

  1. TDM Data Painter:AcctNo

Datatype : string

Nullable : True

Validation Rules:   maxLength : 17; pattern : [A-Za-z0-9\-]+

Function:  @if(1=2,~NOVALUE~,A0017235698234)@

 

  1. Published XML for table MyInfo

<MyInfo/>    When all fields are empty or have ~NOVALUE~, the end tag should not exist in the XML file.

This is the XSD.    

 

<!—My Info -->

<xsd:element name="MyInfo" minOccurs="0">

     <xsd:annotation>

         <xsd:documentation>

           <xsd:Description>My Info</xsd:Description>

         </xsd:documentation>

      </xsd:annotation>

       <xsd:complexType>

            <xsd:sequence>

                 <!-- Choice between Rout No or Other -->

                <xsd:choice minOccurs="0">

                    <!-- Rout No-->

                    <xsd:element name="RoutNo" type="RoutNoType">

                       <xsd:annotation>

                            <xsd:documentation>

                                 <xsd:Description>Rout No</xsd:Description>

                             </xsd:documentation>

                       </xsd:annotation>

                    </xsd:element>

                    <!-- Other-->

                    <xsd:element name="OtherCd" minOccurs="0">

                       <xsd:annotation>

                             <xsd:documentation>

                                   <xsd:Description>Check</xsd:Description>

                             </xsd:documentation>

                       </xsd:annotation>

                       <xsd:simpleType>

                           <xsd:restriction base="StringType">

                                 <xsd:enumeration value="Other"/>

                            </xsd:restriction>

                       </xsd:simpleType>

                     </xsd:element>

                </xsd:choice>

                 <!-- Acct No-->

                     <xsd:element name="AcctNo" type="AcctNoType" minOccurs="0">

                         <xsd:annotation>

                                <xsd:documentation>

                                   <xsd:Description>Acct No</xsd:Description>

                                </xsd:documentation>

                            </xsd:annotation>

                       </xsd:element>

             </xsd:sequence>

        </xsd:complexType>

</xsd:element>

Environment

Release : 4.9

Component : CA Test Data Manager

Resolution

This is addressed in TDMWeb-4.9.41.0 or greater.

After applying the patch, you need to add a new property in the \Program Files\CA\CA Test Data Manager Portal\conf\catdmshredder.properties file.

1. Open the catdmshredder.properties file for edit.
2. Add new line: removexmltag_nodata=true
3. Save changes to the file
4. Restart the CA Test Data Manager Portal service.