XML Adapter returning empty recurring element

Hi

My incoming XML document contains a recurring element (with children), recurring up to 50 times. I want the outgoing XML document to have the same number of recurrences as the incoming document.

At the moment, even if the incoming document has one occurrence, the outgoing document contains 50, with the first one populated and the remainder being empty elements.

I have tried the (/V) notation in the idl file, but our version of the RPC server (and probably Natural) does not support this.

Where does the outgoing XML document get created? It doesn’t seem to happen in the adapter class which is generated. This class seems to provide the structure but I can’t see that this is where the document is populated. My idea is to change the code that generates the outgoing document to not create the recurring elements when they are empty. Is this possible (or adviseable)?

Thanks
Elsab

Hi Elsabe,

this appears to be bug in the XML Wrapper. You can select the suppression of empty elements, attributes and arrays, by going to the “Mapping Paramter” within the Workbench. I tried this and various other things, but I also cannot get it to suppress empty elements/arrays.

I suggest you open a support request so that this problem can be fixed.

Regards
Theo

Before I forget, with the new versions (since v7.1.1) of the XML Wrapper you generate a mappings file (.xmm), which you deploy within the context of the App Server or Servlet Engine. EntireX now provides the XML Servlet, which you also deploy within the same environment as your .xmm file. The Adapter Class no longer gets generated (unless you select the “Generate EntireX 6 Compatible Mapping and XMLAdapter classes” option.

When you deploy using the XML Servlet, you have no option to change the code or the behavior at runtime. Your only option is to select the appropriate settings when generating your SOAP/XML mappings within the Workbench.

Theo

Hi Elsabe !

I had a similar problem (EXX 721) and opened a support request some weeks ago.
Here is the SAG answer:
"The problem is reproducible and we can provide the following workaround:
Change the generated Mapping file as follows:
select the OUT-tree (where the array is located), choose the Array-Envelope node (=Par02), open the XMLDetails (by doubleclick at the node) and change the MinOccur from 0 to 1. Save the mapping file and restart your webserver."

Hope this helps

Hi MAGSBG

Thanks for the reply but no, it doesn’t help me. My MinOccur was 1 already. I have tried all possible combinations and settings of the null value suppress options but nothing works. I am not sure whether it is because my recurring element contains child elements which have a min and max of 1 and cannot be suppressed. Obviously what I want is if all the child elements within a parent is empty the complete parent must be suppressed. Will have to wait for the fix of the error.

Thanks
Elsabe