[geotk] Reading MD_BrowseGraphic element

Martin Desruisseaux martin.desruisseaux at geomatys.fr
Mon Jul 8 09:12:45 PDT 2013


Hello Vincent

Le 05/07/13 13:18, Vincent Gaudissart a écrit :
> (...snip...)
> @XmlType(name = "FileName_Type", namespace = Namespaces.GMX)
> public class FileName {
>     @XmlAttribute(name = "src", namespace = Namespaces.GMX)
>     private URI src;
>
> (...snip...)
> Whatever changes I make, they have no effect or I get the following error:
> com.sun.xml.internal.bind.v2.runtime.IllegalAnnotationsException: 1 
> counts of IllegalAnnotationExceptions
> @XmlAttribute/@XmlValue need to reference a Java type that maps to 
> text in XML.
>     this problem is related to the following location:
>         at private java.net.URI test.gmx.FileName.src
>         at test.gmx.FileName

Apparently JAXB complains about the 'src' attribute not being a 
text-like object. I'm a little bit surprised, because I though that JAXB 
was mapping URI to String by itself. But just in case, did you tried to 
change the type of the 'src' field from URI to String?

     Martin

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geotoolkit/attachments/20130708/cefa4553/attachment.html>


More information about the Geotoolkit mailing list