When trying to upload a schema into mendix 6.6 , I get this error: Type folderNodeType: This Choice element is not supported in export mappings.

0
When trying to upload a schema into mendix 6.6 , I get this error: Type 'folderNodeType': This 'Choice' element is not supported in export mappings. The snippet of this type is below. What could be minimal edit needed in this xsd to make mendix accept this xsd? <xs:complexType name="folderNodeType"> <xs:complexContent> <xs:extension base="chatflowNode"> <xs:sequence> <xs:choice maxOccurs="unbounded" minOccurs="0"> <xs:group ref="commonChatflowNodePropertiesChilds"/> </xs:choice> <xs:choice maxOccurs="unbounded" minOccurs="0"> <xs:group ref="commonChatflowNodeChilds"/> <xs:element type="conceptNodeType" name="concept"/> </xs:choice> <xs:element name="autoLearnVariations" minOccurs="0"> <xs:complexType> <xs:sequence> <xs:element name="item" type="xs:string" minOccurs="0" maxOccurs="unbounded"/> </xs:sequence> </xs:complexType> </xs:element> </xs:sequence> <xs:attribute type="xs:string" name="label" use="optional"/> <xs:attribute type="selectionTypeType" name="selectionType" use="optional"/> </xs:extension> </xs:complexContent> </xs:complexType>
asked
2 answers
1

I checked one of my projects and I am able to use choice elements in a export mapping. I don't use the schema importer because I use it with a web service. This is the part in the WSDL where the choice element is used:

<xs:complexType name="opvragenRepertoriumVraag">
    <xs:sequence>
        <xs:element name="protocolnummer" nillable="false" type="protocolnummer">
            <xs:annotation>
                <xs:documentation>
    Het protocolnummer is het nummer dat hoort bij het protocol van de notaris (en voorgangers en opvolgers).
                </xs:documentation>
            </xs:annotation>
        </xs:element>
        <xs:choice>
            <xs:element name="repertoriumnummerInterval" nillable="false" type="repertoriumnummerInterval"/>
            <xs:element name="dagtekeningAktePeriode" nillable="false" type="dagtekeningAktePeriode"/>
            <xs:element name="inschrijfdatumPeriode" nillable="false" type="inschrijfdatumPeriode"/>
        </xs:choice>
    </xs:sequence>
</xs:complexType>

This is accepted by Mendix 6.6 and works perfect.

The export mapping looks like this: Screenshot Mendix mapping

Maybe Mendix has to expand support for choice elements to XML exports since it already works with web services. I suggest you file a ticket to get some more clarity.

answered
0

Probably the easiest way to fix this is to create two XSD's. One for each choice. In Mendix you should be able to determine which Export mapping you would like to use.

This won't work when the choice element is a part of an element that occurs more than once because then you can have multiple choices within one XML. In that case you will probably need custom Java code to do the export.

answered