views:

24

answers:

0

The problem that I am trying to solve is that JAXB cannot handle the parent and inherited objects of the same name in different namespaces.

I have two schemas:

schemaA.xsd

<xs:schema xmlns:A="...">
<xs:complexType name="mytype">
...

schemaB.xsd

<xs:schema xmlns:B="..." xmlns:A="...">
<xs:import namespace="..." schemaLocation="schemaA.xsd"/>
<xs:complexType name="mytype">
...

Here the mytype definition is different in schemaB. And no, I have no control over the schemas, they are large commercial thirdparty supplied. How do people deal with this situation? The point is that schemaB references schemaA and indeed uses many elements from schemaA. JAXB cannot run on B alone, but it can and does on A alone.

One last point, there are many many elements involved, cannot add JAXB customization to all of them. Well it would be a lot of work.