You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Daniel Kulp (JIRA)" <ji...@apache.org> on 2017/05/04 18:48:04 UTC
[jira] [Resolved] (CXF-7358) cxf-xjc-plugin 3.1.0 for maven not
generating enumerations
[ https://issues.apache.org/jira/browse/CXF-7358?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp resolved CXF-7358.
------------------------------
Resolution: Not A Problem
Assignee: Daniel Kulp
Fix Version/s: Invalid
Not really a bug as this is per JAXB spec. JAXB won't generate an enum in this case as there isn't a "name" for the enum type. You can use a jaxb customization file to specify the type name to use. For example, you can see the answers to a very similar question at:
http://stackoverflow.com/questions/586224/jaxb-anonymous-simple-types-as-enums
> cxf-xjc-plugin 3.1.0 for maven not generating enumerations
> ----------------------------------------------------------
>
> Key: CXF-7358
> URL: https://issues.apache.org/jira/browse/CXF-7358
> Project: CXF
> Issue Type: Bug
> Components: JAXB Databinding
> Affects Versions: 3.1.11
> Environment: maven java project, eclipse external build, windows 7,
> Reporter: J. Scott Franko
> Assignee: Daniel Kulp
> Fix For: Invalid
>
>
> plugin
> <plugin>
> <groupId>org.apache.cxf</groupId>
> <artifactId>cxf-xjc-plugin</artifactId>
> <version>3.1.0</version>
> <configuration>
> <extensions>
> <extension>org.apache.cxf.xjcplugins:cxf-xjc-dv:3.1.0</extension>
> <extension>org.apache.cxf.xjcplugins:cxf-xjc-bug986:3.1.0</extension>
> </extensions>
> </configuration>
> <executions>
> <execution>
> <id>generate-sources</id>
> <phase>generate-sources</phase>
> <goals>
> <goal>xsdtojava</goal>
> </goals>
> <configuration>
> <xsdOptions>
> <xsdOption>
> <xsd>src/main/resources/RdsXmlSchema.xsd</xsd>
> <packagename>com.fedex.vision.rds.schema</packagename>
> </xsdOption>
> </xsdOptions>
> </configuration>
> </execution>
> </executions>
> </plugin>
> </plugins>
> xsd
> <xsd:element name="message">
> ...
> <xsd:attribute name="messageType" use="required">
> <xsd:simpleType>
> <xsd:restriction base="xsd:string">
> <xsd:enumeration value="raw"/>
> <xsd:enumeration value="processed"/>
> <xsd:enumeration value="ids"/>
> <xsd:enumeration value="rfi"/>
> <xsd:enumeration value="rfiResponse"/>
> </xsd:restriction>
> </xsd:simpleType>
> </xsd:attribute>
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)