highsource / highsource/jsonix

xsi:type support is not working when multiple name spaces exist

Open
#239 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
369
Forks
85
PR merge metrics
No merged PRs in 30d

Description

When Unmarsalling from XML to JSON it's not converting to the xsi:type, You can see the sample code [here](https://jsfiddle.net/abdul_sathar/x83p4hLz/4/)
This is the XML I have tried,
`

Identifier is created from the uid of the input scheme



Location of well surface point in projected system.
coordinate


`

Here Location is marked with xsi:type="ProjectedWellLocation", but the JSON output its converted as its base type "AbstractWellLocation". If I removed the "Aliases" section then it's working correctly. so the issue is happening when there is defaultElementNamespace referenced.

After debugging the issue found that here failing to get the xsiTypeInfo, because of namespaceContext.getNamespaceURI(prefix) giving wrong namespace from Jsonix.Schema.XSD.QName.INSTANCE.parse()

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.