Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-7188

javax.xml.bind.annotation.XmlEnumValue annotation should be honored in Aegis data binding

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.7.18, 3.1.9, 3.0.12
    • None
    • Aegis Databinding
    • None
    • Unknown

    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 :

      @XmlEnumValue("Completed")
      COMPLETED("Completed")
      

      .

      However, when a web service is exposed that uses this enum, WSDL shows that this service expects values all in uppercase, e.g.,:

      <xsd:enumeration value="COMPLETED"/>
      

      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:

      Illegal argument. No enum constant <target namespace>.Completed.
      

      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)

      Attachments

        Issue Links

          Activity

            People

              ffang Freeman Yue Fang
              stulac Sanjin Tulac
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: