Hello,

i don't have answer from JAXB mailing list, and i cannot find a clean 
solution. Maybe some here knows.

Problem:

i'm, using jaxb2.1.6 and i cannot find a solution for mapping of one 
situation (see attached XSD). Without customization xjc generates only 
list of jaxbElements. With customization i have 3 or maybe 4 different 
errors depending on how do i try to map elements to property names. 

I also found this 
http://www.nabble.com/jaxb2---duplicate-element--issue-td16429810.html 

Does someone know how to map it? Atm. it's not important, if "the same 
elements" in various branches of choice are mapped to the same property or 
to different properties. But to have the same element (name+type) mapped 
to one property is prefered way. 

 Error message depends also on fact, if i'm trying to map the elements 
with the same name+type to the same property name or not. 
Some of errrors: 
com.sun.istack.SAXParseException2: Element "{http://x.y.z}b"; shows up in 
more than one properties. 
com.sun.istack.SAXParseException2: compiler was unable to honor this 
property customization. It is attached to a wrong place, or its 
inconsistent with other bindings. (this one is from the same xsd as 
previous, i only changed customized property names to the same for the 
same element name+type) 
Other errors i had was about ambiguity and about property name collision. 


thank you for sharing your idea/solution 

best regards 
jano



Reply via email to