Open glassfishrobot opened 13 years ago
Reported by semancik
laune said: The XML schema is compiled into a class where two elements are annotated with @XmlAnyElement, which violates the JAXB Specification (section 8.9.6.2). xjc should refuse to compile this schema, with an appropriate diagnostic.
The proper way of using xsd:any in combination with
@pavelbucek said: I concur with Wolfgang analysis (thanks!); this is xjc issue, not runtime.
Proposed way to implement what you want with jaxb:dom is also correct approach which you should take.
I looked into the source and looks like nice solution would require some changes in codemodel, concretely we need to allow extract annotation class from JAnnotationUse to make check for two or mode XmlAnyElement annotated field/method.
snajper said: Downgrading priority based on evaluation
File: common.xsd Attached By: semancik
File: jaxbtest.tar.gz Attached By: semancik
Was assigned to snajper
This issue was imported from java.net JIRA JAXB-798
Two consecutive elements with jaxb:dom annotations seems to get confused during unmarshalling. See attached schema.
For the following XML snippet:
<c:valueAssignment xsi:type="c:ValueAssignmentType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:c="http://xml.netbeans.org/schema/common">