[ https://issues.apache.org/jira/browse/CXF-3513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13045622#comment-13045622 ]
Daniel Kulp commented on CXF-3513: ---------------------------------- I cannot reproduce the wsimport version you have above. If I add an enumeration like: {code:xml} <simpleType name="UTFStringEnum"> <restriction base="string"> <enumeration value="Suprême"/> <enumeration value="Agué"/> <enumeration value="Gravè"/> <enumeration value="DECISIONéàçèETTT"/> </restriction> </simpleType> {code} and I run wsimport, I get: {code:java} @XmlEnumValue("Supr\u00eame") SUPR\u00caME("Supr\u00eame"), @XmlEnumValue("Agu\u00e9") AGU\u00c9("Agu\u00e9"), @XmlEnumValue("Grav\u00e8") GRAV\u00c8("Grav\u00e8"), @XmlEnumValue("DECISION\u00e9\u00e0\u00e7\u00e8ETTT") DECISIO_N\u00c9\u00c0\u00c7\u00c8_ETTT("DECISION\u00e9\u00e0\u00e7\u00e8ETTT"); {code} which is exactly what I get from the CXF wsdl2java command and is per spec. > [cxf-codegen-plugin][Generate WSDL->Java][illegal character] > ------------------------------------------------------------ > > Key: CXF-3513 > URL: https://issues.apache.org/jira/browse/CXF-3513 > Project: CXF > Issue Type: Bug > Affects Versions: 2.4 > Environment: Windows XP > Red Hat 5.3 64Bits > Reporter: SQLI EQUERRE > Priority: Minor > > I use a maven plugin (cxf-codegen-plugin) to generate wsdl to java > here's my config : > <plugin> > <groupId>org.apache.cxf</groupId> > <artifactId>cxf-codegen-plugin</artifactId> > <version>2.4.0</version> > <executions> > <execution> > <id>generate-sources</id> > <phase>generate-sources</phase> > <goals> > <goal>wsdl2java</goal> > </goals> > </execution> > </executions> > <configuration> > <defaultOptions> > <bindingFiles> > > <bindingFile>${basedir}/src/main/bindings/jaxb-bindings.xml</bindingFile> > </bindingFiles> > <noAddressBinding>true</noAddressBinding> > </defaultOptions> > <wsdlRoot>${basedir}/src/main/wsdl</wsdlRoot> > <includes> > <include>**/*.wsdl</include> > </includes> > <sourceRoot>${basedir}/src/main/java</sourceRoot> > </configuration> > > My wsdl file has this enumeration : > <xs:simpleType name="Type"> > <xs:restriction base="xs:string"> > <xs:enumeration value="DECISIONéàçèETTT"/> > <xs:enumeration value="ELABORATION"/> > <xs:enumeration value="VALIDATION"/> > </xs:restriction> > </xs:simpleType> > > > In conclusion, one enumeration with french accent. > But my java file generated with CxF-codegen-plugin looks like this : > /** > * <p>Java class for Type. > * > * <p>The following schema fragment specifies the expected content contained > within this class. > * <p> > * <pre> > * <simpleType name="Type"> > * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> > * <enumeration value="DECISIONéà çèETTT"/> > * <enumeration value="ELABORATION"/> > * <enumeration value="VALIDATION"/> > * </restriction> > * </simpleType> > * </pre> > * > */ > @XmlType(name = "Type") > @XmlEnum > public enum Type { > > @XmlEnumValue("DECISION\u00c3\u00a9\u00c3\u00a0\u00c3\u00a7\u00c3\u00a8ETTT") > > DECISIONÃ_Ã_Ã_Ã_ETTT("DECISION\u00c3\u00a9\u00c3\u00a0\u00c3\u00a7\u00c3\u00a8ETTT"), > ELABORATION("ELABORATION"), > VALIDATION("VALIDATION"); > > > > And with wsimport command line (wsimport -s c:\ test.wsdl.) looks like this : > /** > * <p>Java class for Type. > * > * <p>The following schema fragment specifies the expected content contained > within this class. > * <p> > * <pre> > * <simpleType name="Type"> > * <restriction base="{http://www.w3.org/2001/XMLSchema}string"> > * <enumeration value="DECISIONéàçèETTT"/> > * <enumeration value="ELABORATION"/> > * <enumeration value="VALIDATION"/> > * </restriction> > * </simpleType> > * </pre> > * > */ > @XmlType(name = "Type") > @XmlEnum > public enum Type { > @XmlEnumValue("DECISION\u00e9\u00e0\u00e7\u00e8ETTT") > DECISIO_NÉÀÇÈ_ETTT("DECISION\u00e9\u00e0\u00e7\u00e8ETTT"), > ELABORATION("ELABORATION"), > VALIDATION("VALIDATION"); > > This is better !!!!! > Thank you for your answers :) > PS: sorry for my English -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira