Details
Description
I am not sure weather its bug or I am doing something wrong. Basically I am creating REST API with Enum as one of the QueryParam. The Enum class is generated from xsd :
Enum in xsd:
<xsd:simpleType name="CodeEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="One" />
<xsd:enumeration value="Two" />
<xsd:enumeration value="Hello World" />
</xsd:restriction>
</xsd:simpleType>
Jaxb class for Enum has variables ONE("One"), TWO("Two"), HELLO_WORLD("Hello World")
REST API: getCode(@QueryParam("code") CodeEnum code);
CXF Generated WADL content for API is :
<resource path="getCode">
<method name="GET">
<request>
<param name="code" style="query" type="xs:string">
<option value="ONE"/>
<option value="TWO"/><option value="HELLO_WORLD"/>
</param></request>
Here What I observed in wadl is options values are Enum names I would expect Enum values..
If above wadl option is selected . CXF server throws IllegalArgumentException since it could not find ONE.
Is it bug or is there any work around to solve this issue
Thanks in advance.