on 01-06-2015 12:11 PM
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,
This SAP note may be related:
1960289 - AutoAppendBlankNamespaces attribute doesnt work as expected
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bram,
Below is what has worked for me.
- A transaction with xml property, master = xml in attach1.
- Another aml property, conf = <nonConformance1 xmlns=""/>
- Repeater(a have used for loop for test) and
- Assignment logic:
Local.master Append XML Local.conf
The output is:
<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<ReelData xmlns="AutostoreSOAPInterface">
<rollNumber xmlns=""/>
<materialCode xmlns=""/>
<materialDescription xmlns=""/>
<batch xmlns=""/>
<plant xmlns=""/>
<grade xmlns=""/>
<substance xmlns=""/>
<subgrade xmlns=""/>
<substandard xmlns=""/>
<width xmlns=""/>
<diameter xmlns=""/>
<diameterPlanned xmlns=""/>
<diameterMin xmlns=""/>
<diameterMax xmlns=""/>
<weight xmlns=""/>
<salesOrder xmlns=""/>
<salesOrderItem xmlns=""/>
<stockCategory xmlns=""/>
<nonConformance1/>
</ReelData>
</soap:Body>
<nonConformance1 xmlns=""/>
<nonConformance1 xmlns=""/>
<nonConformance1 xmlns=""/>
</soap:Envelope>
Is this only what you need?
Let me know how are you trying to assign xml to main xml. A screen shot of transaction would be more helpful.
Thanks and Regards,
Swaroop
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Swaroop,
the nonConfomance1 tags should come within the ReelData tag. In the SOAP there is only one mentioned, but in the transaction this one is not in, but the nonConformance 1 tags are indeed appended inside the ReelData with a repeater.
The issue I have is that when defining a local XML for the nonConformance1 part to append, and I add an empty namespace xmlns="" (<nonConformance1 xmlns="" />), when saving and opening the local XML property again, the namespace was deleted automatically from the local XML. Apparently for you this local property assignment with empty namespace does work?
Below some screenshots of the transaction
User | Count |
---|---|
13 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.