Uploaded image for project: 'HPCC'
  1. HPCC
  2. HPCC-18646

ECLPlus not returning valid XML with Assert

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Not specified
    • Resolution: Won't Fix
    • Affects Version/s: 5.6.4, 6.4.2
    • Fix Version/s: None
    • Component/s: ECL Plus
    • Labels:
      None

      Description

      ECLPlus not returning valid XML with Assert

      HPCC version 5.6.4, client tools 5.6.4... (Also with version 6.4.2)
      I run this ECL:

      OUTPUT('Test 1 <>&');
      
      ASSERT(1 = 2, 'Test 2 <>&'); 
      

      If I run code with client tools ecl run, XML is ok.
      /opt/HPCCSystems/5.6.4/clienttools/bin/ecl run --server 1.1.1.1 --port 8010 --username 'oscarfoley' --password ' ' -legacy thor testecl.ecl

      <Result>
       <Exception><Code>100000</Code><Filename>testecl.ecl</Filename><Line>3</Line><Source>user</Source><Message>Test 2 &lt;&gt;&amp;</Message></Exception>
      <Dataset name='Result 1'>
       <Row><Result_1>Test 1 &lt;&gt;&amp;</Result_1></Row>
      </Dataset>
      </Result>

      But if I get the very same work unit result with ecl plus, XML is invalid 
      eclplus server=10.53.57.69 action=view wuid=W20171030-184629 format=xml

       

       

      <Error><source>user</source><line>3</line><code>100000</code><message>Test 2 <>&</message></Error>
      <Dataset name='Result 1'>
       <Row><Result_1>Test 1 &lt;&gt;&amp;</Result_1></Row>
      </Dataset>

      XML retrieved by ECLPlus is invalid because:
      1) ASSERT message <message>Test 2 [b]<>&[/b]</message> does not escape XML special characters so XML is invalid. However OUTPUT Test1 is correctly escaped.
      2) XML does not have root element. Everything should be surrounded by <Result></Result>
      3) XML returned by ecl run and eclplus have different casing for ASSERT. XML is Case sensitive...
      4) XML returned by ecl run and eclplus is different for ASSERT. They should be identical, shouldn't them? One uses <Exception> and the other <Error>

       

      <Exception><Code>100000</Code><Filename>testecl.ecl</Filename><Line>3</Line><Source>user</Source><Message>Test 2 &lt;&gt;&amp;</Message></Exception>
      
      vs.
      
      <Error><source>user</source><line>3</line><code>100000</code><message>Test 2 <>&</message></Error>

       

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            oscarfoley Oscar Foley
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: