Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
nightly
Description
AXIS2-4859 has been patched adding the -Eiu option to ignore unexpected elements. However, to truly be forward-compatible, generated code should also ignore unexpected enumeration values.
Here's the snippet necessary for the adb code generation. I opted to return null when an unexpected enumeration is found, as opposed to skip it:
ADBBeanTemplate-bean.xsl line 2135:
// handle unexpected enumeration values properly <xsl:if test="$ignoreunexpected"> log.warn("Unexpected value " + value + " for enumeration <xsl:value-of select="$name"/>"); return enumeration; </xsl:if> <xsl:if test="not($ignoreunexpected)"> if ((enumeration == null) && !((value == null) || (value.equals("")))) { throw new java.lang.IllegalArgumentException(); } return enumeration; </xsl:if>
Attachments
Attachments
Issue Links
- relates to
-
AXIS2-4859 Optional "Ignore Unexpected Elements" mode - allows for forward-compatible clients
- Resolved