Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Empty namespace in XML automatically removed in SAP MII

Hi,

I need to built up a SOAP XML with empty namespaces for specific elements (structure SOAP, see attachment 1). For the dynamic part of this SOAP (nonConformance1 tags) I use an MII repeater to append the main XML SOAP with local XMLs (attachment 2), because the number of nonConformance1 tags is dyncamic (0 to multiple in one SOAP message). These nonConformance1 tags need to have a namespace which is empty (required by the target destination which is an automatic warehouse application) => xmlns="". I tried to make a local XML with default an empty namespace, but for some kind of reason an empty namespace is removed by SAP MII. I use version 12.2. Does anyone have an idea why empty namespaces are removed automatically or knows if there is a setting in MII or Netweaver to switch this off?

I also tried a different approach by using an XSLT transformation which should add the empty namespaces to the SOAP XML. I've tested this in other environments (ex. Notepath++) and in these environments I got the correct output required. However, when I implemented the logic in SAP MII, the empty namespaces were removed again. I tried with a filled in namespace as well, and this was created correct in MII, only the empty ones Always dissapear.

Any suggestion how to solve this? How can I force MII to keep empty namespaces in place?

For the XSLT scenario the input XML, output XML and XSL script can be found in attachment 3

Kr,

attach3.txt.zip (899 B)
attach2.txt.zip (257 B)
attach1.txt.zip (552 B)
Former Member
Not what you were looking for? View more on this topic or Ask a question