Hi,
Just found out a similar issue has already been filed as bug #155. I'll go and give my vote to that. Sorry for the inconvenience.
Regards, Petteri
-----Original Message-----
From: Petteri Stenius
Sent: Monday, November 06, 2006 7:14 PM
To: 'users_at_jaxb.dev.java.net'
Subject: javaType generates JAXBElement wrapper
Hi,
I think the following behavior is strange.
My schema fragment looks like this:
<complexType name="Document">
<sequence>
<element ref="my:Property" maxOccurs="unbounded"/>
</sequence>
</complexType>
<element name="Property" type="anyURI"/>
As expected the schema generates an accessor method as follows:
List<String> getProperty();
However, because I'd like to substitute java.net.URI for anyURI I added the following to globalBindings:
<jaxb:javaType name="java.net.URI" xmlType="anyURI"/>
The surpise is that after this the accessor method looks like this:
List<JAXBElement<URI>> getProperty();
Why did the JAXBElement wrapper appear here?
Regards,
Petteri Stenius