Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-34106

XML.prettyPrinting strips leading and trailing spaces from string values in xml structure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • Apache Flex 4.8 (parity release), Apache Flex 4.9.0, Apache Flex 4.10.0, Apache Flex 4.11.0
    • None
    • RPC: WebService

    Description

      When XML.prettyPrinting is set to true, it will strip leading and trailing spaces from string values inside the soap envelope

      I'm attaching a project which uses a public soap interface used by adobe for their "Flex in a Week" training program. You must have visibility to this soap service for this to work right away. I've also monkey patched mx.rpc.soap.SOAPEncoder from Flex 4.11.0 to include trace statements at lines 171 and 179

      To Reproduce

      1.) Debug the attached project
      2.) In the department field type " test test " (without quotes)
      4.) Click Submit button

      Result

      Look in the console window and look for !!Unable to render embedded object: File (NO PRETTY PRINTING) not found.!! below that trace line you will see a collapsed soap envelope. Scroll to the right and look for the "DEPARTMENT" property in the soap envelope. Note the value has the leading and trailing spaces. Now look for !!Unable to render embedded object: File (PRETTY PRINTING) not found.!!. In the soap envelope below that line look at the DEPARTMENT property. Note that the leading and trailing spaces are gone.

      Expected Result

      Both string values match in the xml structure regardless of prettyPrinting.

      From the dropdown choose

      Attachments

        1. ex2_09_solution.zip
          1.69 MB
          Chris Martin

        Activity

          People

            Unassigned Unassigned
            chrsmrtn Chris Martin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: