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 )
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>