Hello
I am migrating my XML-handling code from JAXB 1 to 2.0 version, as a result
of migrating from SJSAS 8 to 9.1.
I am using XJC via an ANT script. So far, the only thing I had to change is
the parameter "target" that must be replaced with "destdir". I left all of
the other params and attributes unchanged.
I have noticed a difference in the generated Java code. For the following
schema fragment:
* <simpleType name="PaymentIdentification">
* <restriction base="{
http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="Termini di penalità"/>
* <enumeration value="Pagamento a rate"/>
* <enumeration value="Sconti"/>
* <enumeration value="Pagamento completo"/>
* <enumeration value="Anticipo"/>
* </restriction>
* </simpleType>
*
with JAXB 1 I get the following code:
@XmlEnumValue("Anticipo")
ANTICIPO("Anticipo"),
@XmlEnumValue("Pagamento a rate")
PAGAMENTO_A_RATE("Pagamento a rate"),
@XmlEnumValue("Pagamento completo")
PAGAMENTO_COMPLETO("Pagamento completo"),
@XmlEnumValue("Sconti")
SCONTI("Sconti"),
@XmlEnumValue("Termini di penalit\u00e0")
TERMINI_DI_PENALITÀ("Termini di penalit\u00e0");
private final String value;
whereas with JAXB 2.0 I get:
@XmlEnumValue("Termini di penalit\u00e0")
TERMINI_DI_PENALIT�("Termini di penalit\u00e0"),
@XmlEnumValue("Pagamento a rate")
PAGAMENTO_A_RATE("Pagamento a rate"),
@XmlEnumValue("Sconti")
SCONTI("Sconti"),
@XmlEnumValue("Pagamento completo")
PAGAMENTO_COMPLETO("Pagamento completo"),
@XmlEnumValue("Anticipo")
ANTICIPO("Anticipo");
private final String value;
As you can see the uppercase accented A in the value for "Termini di
penalità" is correct in the former case, not in the latter.
This causes NetBeans and, what's worse, compilation problems.
How can I solve this ? Please note that XSD's come from third parties and I
have no way to change them.
Thanks.
--
View this message in context: http://www.nabble.com/Difference-in-generated-Java-with-accented-chars-tp14453877p14453877.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.