cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "SQLI EQUERRE (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-3513) [cxf-codegen-plugin][Generate WSDL->Java][illegal character]
Date Fri, 13 May 2011 12:12:47 GMT
[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
         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>
 * &lt;simpleType name="Type">
 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     &lt;enumeration value="DECISIONéàçèETTT"/>
 *     &lt;enumeration value="ELABORATION"/>
 *     &lt;enumeration value="VALIDATION"/>
 *   &lt;/restriction>
 * &lt;/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>
 * &lt;simpleType name="Type">
 *   &lt;restriction base="{http://www.w3.org/2001/XMLSchema}string">
 *     &lt;enumeration value="DECISIONéàçèETTT"/>
 *     &lt;enumeration value="ELABORATION"/>
 *     &lt;enumeration value="VALIDATION"/>
 *   &lt;/restriction>
 * &lt;/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

Mime
View raw message