cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sanjin Tulac (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CXF-7188) javax.xml.bind.annotation.XmlEnumValue annotation is ignored in inbound web services
Date Mon, 19 Dec 2016 21:18:58 GMT

     [ https://issues.apache.org/jira/browse/CXF-7188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sanjin Tulac updated CXF-7188:
------------------------------
    Description: 
I've been trying to use CXF with Aegis DataBinding to host a web service that needs to be
called by a 3rd party, using 3rd party's XML schema.

3rd party XML schema uses enumeration where values have first character upper-case, and the
rest is lower-case, e.g., "Completed".

>From this XML schema, wsdl2java correctly creates the following Java enum value using
javax.xml.bind.annotation.XmlEnumValue annotation :
{code}
@XmlEnumValue("Completed")
COMPLETED("Completed")
{code}.

However, when a web service is exposed that uses this enum, WSDL shows that this service expects
values all in uppercase, e.g.,:
{code}
<xsd:enumeration value="COMPLETED"/>
{code}

The same problem is also encountered at run-time. E.g., when XML complying to 3rd party XML
schema is being converted to a Java object, the web service returns:
{code}
Illegal argument. No enum constant <target namespace>.Completed.
{code}
I've encountered this defect on v. 2.7.18, but I've been able to reproduce it on the 3.2.0
snapshot from Dec 12th 2016 (master branch as of commit  b49075882641fcebbbdf1ed8d84247fcf80aa558)


  was:
I've been trying to use CXF with Aegis DataBinding to host a web service that needs to be
called by a 3rd party, using 3rd party's XML schema.

3rd party XML schema uses enumeration where values have first character upper-case, and the
rest is lower-case, e.g., "Completed".

>From this XML schema, wsdl2java correctly creates the following Java enum value using
javax.xml.bind.annotation.XmlEnumValue annotation :
{code}
@XmlEnumValue("Completed")
COMPLETED("Completed")
{code}.

However, when a web service is exposed that uses this enum, WSDL shows that this service expects
values all in uppercase, e.g.,:
{code}
<xsd:enumeration value="COMPLETED"/>
{code}
I've encountered this defect on v. 2.7.18, but I've been able to reproduce it on the 3.2.0
snapshot from Dec 12th 2016 (master branch as of commit  b49075882641fcebbbdf1ed8d84247fcf80aa558)



> javax.xml.bind.annotation.XmlEnumValue annotation is ignored in inbound web services
> ------------------------------------------------------------------------------------
>
>                 Key: CXF-7188
>                 URL: https://issues.apache.org/jira/browse/CXF-7188
>             Project: CXF
>          Issue Type: Bug
>          Components: Aegis Databinding
>    Affects Versions: 2.7.18
>            Reporter: Sanjin Tulac
>
> I've been trying to use CXF with Aegis DataBinding to host a web service that needs to
be called by a 3rd party, using 3rd party's XML schema.
> 3rd party XML schema uses enumeration where values have first character upper-case, and
the rest is lower-case, e.g., "Completed".
> From this XML schema, wsdl2java correctly creates the following Java enum value using
javax.xml.bind.annotation.XmlEnumValue annotation :
> {code}
> @XmlEnumValue("Completed")
> COMPLETED("Completed")
> {code}.
> However, when a web service is exposed that uses this enum, WSDL shows that this service
expects values all in uppercase, e.g.,:
> {code}
> <xsd:enumeration value="COMPLETED"/>
> {code}
> The same problem is also encountered at run-time. E.g., when XML complying to 3rd party
XML schema is being converted to a Java object, the web service returns:
> {code}
> Illegal argument. No enum constant <target namespace>.Completed.
> {code}
> I've encountered this defect on v. 2.7.18, but I've been able to reproduce it on the
3.2.0 snapshot from Dec 12th 2016 (master branch as of commit  b49075882641fcebbbdf1ed8d84247fcf80aa558)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message