REMOVE CHOICE ELEMET FROM XML SCHEMA TO USE IT IN MENDIX

Remove Choice Element From XML Schema Because it uses Generalization and Can prevent passing of multiple Objects.

- Sarjil Tikki

7/29/20241 min read

When utilizing a SOAP XML API in Mendix. There may be a moment where a choice element appears, and the Mendix treats both the choice element and its offspring as generalizations. However, one limitation with generalization is that a parent can only have one child. However, as the ones that have been mentioned image illustrates, the API accepts multiple child objects for a chosen schema. So, we have a solution to solve this issue.

Simply download the XML Schema or WSDL. Open it in your preferred IDE or Notepad ++. and Look for the Tag Element of your choice. For us, it is SelectedOffer.

Change <xs:choice> to <xs:sequence>, and likewise </xs:choice> to </xs:sequence> for the closing tag.

Save the schema and now use this in Import / Export Mapping you are good to go!