Skip to content

Multiple issues with NeTEx schema: default value false not supported, deserialization exceptions #620

@Micovec

Description

@Micovec

Hello,

I'm trying out this project on commit 62413d4 with xsd from https://github.com/TransmodelEcosystem/NeTEx file xds/NeTEx_publication.xsd and I can't seem to get it to run properly. After a while I always get an exception System.NotSupportedException: 'Getting default value for false. not supported.' in TypeModel:120.

I checked the xsd and it's caused by elements that are of type MultilingualString with default value false.. When I removed that line in netex_framework/netex_reusableComponents/neteq_equipment_version.xsd:151 the exception was the same but this time with false (without the dot). When I removed all of these occurences, it ran fine.

The second issue is that the generated code could not deserialize public NeTEx files from the Czech Central Information System (public transit info in the Czechia): https://portal.cisjr.cz/pub/netex/ files from archive NeTEx_DrahyMestske.zip. SitePathLinkEndStructure class has properties SiteElementRef and EntranceRef that both have XmlElementAttribute attributes with the same element names.

I deleted XmlElementAttributes that had the same element name from SiteElementRef just to see if it was the only issue. It was not. ActivationAssignmentVersionStructure could not be deserialized either. I got an exception: InvalidOperationException: You need to add XmlChoiceIdentifierAttribute to the 'EquipmentRef' member.. In this case I have no idea how to resolve the issue.

I ran the generator with: -t- --sf --nr --nc --uc --oxi --ecl.

xsd.exe craches instantly since the schema has multiple includes which it does not support, lol.

I would take a look at this myself but I don't quite understand xsd and it is going to take some time to understand the codebase of this project. I will try to and will come back when I figure something out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions