Skip to content

Omitted elements when unmarshalling types with same name in different namespaces #83

Closed
@hokkos

Description

@hokkos

Hi,
I use Jsonix with a big collection of schemas. I create a mapping module for each xsd where an xml will be instantiated from. Those xsd import "common" xsd files, and sometime they use a type with the same name in different common xsd (so in different namespaces) and in those case the unmarshalled json will have omitted elements in the elements of the name that are common.

For example a schema A imports schemas B and C (of namespaces b and c) and both contains a type of name "CommonType", schema A uses both b:CommonType and c:CommonType. b:CommonType have the elements "Common" and "B" and c:CommonType have the elements "Common" and "C" . So it seems the unmarshalled json will contain the Common node in b:CommonType and c:CommonType, elements but not their exclusive elements "B" and "C".

So if type have the same name in different namespace, it seems jsonix can't disambiguate them.

I am trying to create a simple reproducible example I can share; but maybe I just did something wrong with the mapping or config.

Thanks.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions