Is there a fix for this Structure naming bug?
Question

This issue has apparently been around for a long time, but I haven't been on this project for the entirety of its life.  As we continue to expand our functionality, we are building new web service endpoints for other services to consume, and that makes this bug show up more frequently if we're not careful.  I'm not at liberty to provide espaces, but I'm fairly sure this bug shows up whenever there is a collision between an XML structure name and the name of an inherited structure or entity.

Let's say we've got a structure called "address".  That's a fairly common use case.  If you make another structure or entity called "address", it will automatically rename the newer one to "address2".  Seems simple enough.  If my SOAP endpoint needs to respond with an XML structure like this

<addresses>

     <address>

          <city/>

          <state/>

     </address>

     <address>

          <city/>

          <state/>

     </address>

</addresses>

normally, in Outsystems, we can just change the label of the element to be "address" while the element type is of a list of address2 structures.  Changing the label should make it display correctly when we respond.  Ordinarily, this works.  However, if address 2 comes from a dependency espace that we're consuming, changing the label of address2 makes it display like this:

<addresses>

     <ssSTaddress>

          <address2>

               <city/>

               <state/>

          </address2>

     </ssSTaddress>

     <ssSTaddress>

          <address2>

               <city/>

               <state/>

          </address2>

     </ssSTaddress>

</addresses>

If we were in this same scenario (address structure in parent espace, address2 structure coming from dependency espace that we're consuming) but we used a list of address2 records instead of a list of address2, we get this:

<addresses>

     <WORCaddressRecord>

          <address2>

               <city/>

               <state/>

          </address2>

     </WORCaddressRecord>

     <WORCaddressRecord>

          <address2>

               <city/>

               <state/>

          </address2>

     </WORCaddressRecord>

</addresses>

Outsystems just inserts these additional tags for some reason.  The only way we've found to avoid this problem is to rename both the label and the structure name of the offending structure to something different, even if it was something like "slightlyDifferentAddress".

Is there a fix for this, or are we stuck with this problem where we can't always name our XML tags what we'd like to because we have another structure by the same name elsewhere in the same espace?

Champion

Hi,


I don't think this is a bug, this is made to do this to prevent duplicate variable/structure/entity/etc.

It's prevention.

HI @Andrew Banks ,

As already one of the structure/attribute named with such name, the platform automatically creating it for you with some duplicate name.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.