XML element naming of a single array <string>

Is there an easy way from the ‘Generate Web Service’ Method in Natural ONE to allow Array element names to default to an appropriate variable name rather than ?

current e.g.
Natural


1 #ERR-MSG-ARR (A/*) DYNAMIC

XML / SOAP


<_ERR-MSG-ARR>
   <string>Error 1!</string>
   <string>Error 2!</string>
<_ERR-MSG-ARR>

The other two solutions in the interim I have found:

Simply declare the single array as a group array (but this becomes cumbersome as you have to filter uneccessary extra content, but at least the field is named nicely :slight_smile: )

Natural


1 #ERR-MSG-ARR (1:*)
   2 #ERR-MSG-RES (A) DYNAMIC

XML / SOAP


            <_ERR-MSG-ARRs>
               <!-- Zero or more repetitions of element (_ERR-MSG-ARR) -->
               <_ERR-MSG-ARR>
                  <_ERR-MSG-RES>Error 1!</_ERR-MSG-RES>
               </_ERR-MSG-ARR>
               <_ERR-MSG-ARR>
                  <_ERR-MSG-RES>Error 2!</_ERR-MSG-RES>
               </_ERR-MSG-ARR>
            </_ERR-MSG-ARRs>

You can tweak the .xmm to change the respective element name to achieve the required result, but it would help greatly with rebuilding / and avoiding user error and to ensure our java aligns more appropriately simply by ‘generate web service’ in NaturalOne.

This is what we want… (I know, I know, you’re thinking… just do it this way then… but nothing ventured nothing gained :lol: )
e.g.
Natural


1 #ERR-MSG-ARR (A/*) DYNAMIC

XML / SOAP


<_ERR-MSG-ARR>
   <_ERR-MSG>Error 1!</_ERR-MSG>
   <_ERR-MSG>Error 2!</_ERR-MSG>
<_ERR-MSG-ARR>

Hi Trentan,

open the XMM Mapping Editor, go to the “Mapping Parameters” tab, deselect “Generate Array Envelope Element” and re-generate.

Then you get:

        <_ERR-MSG-ARR>Error 1!</_ERR-MSG-ARR>
        <_ERR-MSG-ARR>Error 2!</_ERR-MSG-ARR>
 

Is that better?

Thanks for the advice. I tried that initially and have tried it again since… From the initial generate web service, it is not working. When I go to the .xmm and select elements and click ‘generate’ it fixes it?!

I’m going to try clearing all memory and restarting again, hopefully getting it to do it from the initial generate.

In the meantime, I have an easy solution.

Thank you!