Skip to content

XML enrich adds empty namespaces (regression) #729

Description

@Hooghof

As a user I want that an XML enrich merges XML bodies without changing the existing namespaces, so that the structure and meaning of the enriched XML-message remain. There is a difference in output between version 4.17.11 and 4.17.12. The empty namespaces xmlns="" are in the output of 4.17.12.
I couldn't find differences in Camel context and the last Camel update was in Fluxygen version 4.17.9.
Seacon hint for this (AI) change: icFactory.setNamespaceAware(true) in XmlHelper.newDocument, see https://dovetailworld.atlassian.net/browse/FG-2643

Test case

Instance: development
Tenant: Regression Tests
Flow: FG2643_Enrich
Version: 4

Expected output (4.17.11)

<?xml version="1.0" encoding="UTF-8"?><Enriched>
  <articles xmlns="http://wms.blujaysolutions.net/api/article-wms" type="tag">
    <ediCustomerNumber>34840</ediCustomerNumber>
    <article type="tag">
        <articleCode>LDY-L01-SP303</articleCode>
    </article>
</articles>
  <extractResponse xmlns="http://www.kewill.com/cwksb/extract/messages">
    <data name="lf_article_check">
        <status>
            <code>ok</code>
            <message>Data successfully extracted</message>
            <output type="message"/>
        </status>
    </data>
</extractResponse>
</Enriched>

CamelContect_41711.xml

Testen_Enrich_417.11.json.zip

Output (4.17.12)

<?xml version="1.0" encoding="UTF-8"?>
<Enriched>
   <articles xmlns="http://wms.blujaysolutions.net/api/article-wms" type="tag">
      <ediCustomerNumber xmlns="">34840</ediCustomerNumber>
      <article xmlns="" type="tag">
         <articleCode>LDY-L01-SP303</articleCode>
      </article>
   </articles>
   <extractResponse xmlns="http://www.kewill.com/cwksb/extract/messages">
      <data xmlns="" name="lf_article_check">
         <status>
            <code>ok</code>
            <message>Data successfully extracted</message>
            <output type="message"/>
         </status>
      </data>
   </extractResponse>
</Enriched>

CamelContect_41712.xml

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions