@XmlAttribute/@XmlValue need to reference a Java type that maps to text in
I have generated my Java classes that match the schema. Next step I try to marshal a basic sample. I caught the following exception right on the first line :
JAXBContext jc = JAXBContext.newInstance("myschema");
Exception in thread "main" junit.framework.AssertionFailedError: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExcep
@XmlAttribute/@XmlValue need to reference a Java type that maps to text in XML.
this problem is related to the following location:
at protected java.lang.Object myschema.AttrOAnySimple.value
So what does it really mean and what step should I take to solve this issue. Is there any tutorial I should refer to? Why it's not working right out of the box?
So far the only workaround I have found is customization. I have added the following schema and now it works. I got a mapping to String and an Adapter that convert String to/from String. Is this the best way to solve this issue?
<?xml version="1.0" encoding="UTF-8"?>
Message was edited by: thierry_giguere