Forum Discussion

NakD's avatar
NakD
Icon for Altostratus rankAltostratus
Jan 28, 2020

Validation Error: Malformed XML data

Hi,

 

I am getting Validation Error: Malformed XML data for XML request having Katakana/Hiragana characters in it.

 

Below error lines from the request report from F5

 

<v11:frgnfirstName>マレーシア シンガフール</v11:frgnfirstName>

<v11:frgnlastName>ç¯ ç”°</v11:frgnlastName>

  • Do you have an XML profile configured?

    Do you have the correct schema and wsdl configured in the XML profile?

     

    You may need to set the internal ASM variable relax_unicode_in_xml to 1

     

    From the version 12.0.0 release notes:

     

    > So that you can bypass unicode validation on XML and JSON profiles, we added two internal parameters:

    • relax_unicode_in_xml: The default is 0 which is the current behavior. When the value is changed to 1, a bad unicode character does not produce an XML malformed violation. A bad unicode character might be a legal unicode character that does not appear in the mapping of the system's XML parser.
    • relax_unicode_in_json: The default is 0 which is the current behavior. When the value is changed to 1, a bad unicode character does not produce a JSON malformed violation. A bad unicode character might be a legal unicode character that does not appear in the mapping of the system's JSON parser.

     

     

    • NakD's avatar
      NakD
      Icon for Altostratus rankAltostratus

      Thank you S Blakely,

       

      To answer you question,

      Do you have the correct schema and wsdl configured in the XML profile? - YES

       

      Actually we send Katakana & Hirahana Japanese characters in XML like below,

      <v11:frgnfirstName>マレーシア シンガポール</v11:frgnfirstName>

      <v11:frgnlastName>篠田</v11:frgnlastName>

       

      It gets converted to below,

      <v11:frgnfirstName>マレーシア シンガフール</v11:frgnfirstName>

      <v11:frgnlastName>ç¯ ç”°</v11:frgnlastName>

       

      Request is blocked at F5 with Validation Error: Malformed XML data

       

      Will relax_unicode_in_xml to 1 resolve this issue and F5 will pass the request to services end?

      Br,

      Nakul

      • You will need to test to determine whether the issue gets resolved.

         

        But I'm pretty sure it might.

  • Hi All,

    Thanks for explanation. In order to correct you need configure and restart ASM.

    /usr/share/ts/bin/add_del_internal add relax_unicode_in_xml 1.
     
    /usr/share/ts/bin/add_del_internal add relax_unicode_in_json 1.
     
    bigstart restart asm

    Thanks