Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-18634

Target otuput XML doesn't contain all the expected namespaces declarations

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • fuse-7.11-GA
    • fuse-7.10.1-GA
    • Atlas Map
    • None
    • False
    • False
    • % %
    • Todo
    • Hide

      To Reproduce

      Execute the Java class Main.java.txt with:

      The wrong output is:

      {{<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Body>
      <Request>
      <applicationName>AcmeApp</applicationName>
      </Request>
      <Request>
      <requestNumber>25</requestNumber>
      </Request>
      </soapenv:Body>
      </soapenv:Envelope>}}
      Expected behavior
      The output should be:

      {{<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:acme="http://www.acme.xyz">
      <soapenv:Body>
      <acme:Request>
      <acme:applicationName>AcmeApp</acme:applicationName>
      <acme:requestNumber>25</acme:requestNumber>
      </acme:Request>
      </soapenv:Body>
      </soapenv:Envelope>}}
      Additional Info

      I unzipped the atlasmap-mapping-test-ui.adm and found that atlasmapping-UI.0.json doesn't contain all the namespaces declarations for target xml.

      I edited a new atlasmapping-UI.0.json and rezziped in a new atlasmap-mapping-test-forged.adm.zip adding:

      {{

      { "alias" : "acme", "uri" : "http://www.acme.xyz" }

      }}
      And the output has correct namespaces.

      It seems that opening/editing the atlasmap-mapping-test-forged.adm.zip with the UI removes the namespaces again.

      Environment

      Atlas UI Version: atlasmap-standalone-2.4.0-M.4.jar
      Atlasmap: Runtime Version: 2.4.0-M.4
      JDK: openjdk version "11.0.2" 2019-01-15
      OS: Macosx

      Show
      To Reproduce Execute the Java class  Main.java.txt  with: The sample  request.json.txt The Atlasmap file  atlasmap-mapping-test-ui.adm.zip  (just renamed to .zip not rezziped) The wrong output is: {{<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Body> <Request> <applicationName>AcmeApp</applicationName> </Request> <Request> <requestNumber>25</requestNumber> </Request> </soapenv:Body> </soapenv:Envelope>}} Expected behavior The output should be: {{<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:acme="http://www.acme.xyz"> <soapenv:Body> <acme:Request> <acme:applicationName>AcmeApp</acme:applicationName> <acme:requestNumber>25</acme:requestNumber> </acme:Request> </soapenv:Body> </soapenv:Envelope>}} Additional Info I unzipped the atlasmap-mapping-test-ui.adm and found that  atlasmapping-UI.0.json  doesn't contain all the namespaces declarations for target xml. I edited a new  atlasmapping-UI.0.json  and rezziped in a new  atlasmap-mapping-test-forged.adm.zip  adding: {{ { "alias" : "acme", "uri" : "http://www.acme.xyz" } }} And the output has correct namespaces. It seems that opening/editing the  atlasmap-mapping-test-forged.adm.zip  with the UI removes the namespaces again. Environment Atlas UI Version: atlasmap-standalone-2.4.0-M.4.jar Atlasmap: Runtime Version: 2.4.0-M.4 JDK: openjdk version "11.0.2" 2019-01-15 OS: Macosx

    Description

      Please refer to public github issue: https://github.com/atlasmap/atlasmap/issues/3794

       

      Describe the bug

      Using a mapping created with the ui (tested both with visual studio code and standalone ui)
      atlasmap-mapping-test-ui.adm.zip (just renamed to .zip not rezziped) with document instances:

      Produces an xml output without some namespaces.

      Attachments

        1. atlasmap-mapping-test-forged.adm.zip
          2 kB
        2. atlasmap-mapping-test-ui.adm.zip
          2 kB
        3. Main.java.txt
          3 kB
        4. request.json.txt
          0.1 kB
        5. source.json.txt
          0.1 kB
        6. target.xml.txt
          0.4 kB

        Activity

          People

            toigaras@redhat.com tomohisa igarashi
            slinguer1@redhat.com Stefano Linguerri (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: