This is because wsdl2java generates "typesafe enums" for each enumeration. Basically, rather than just creating a series of "static final" constants, it creates objects for each enumeration, which has a major advantage of preventing you from assigning an invalid value to an enumeration.

A good description of typesafe enums is here:
http://developer.java.sun.com/developer/Books/shiftintojava/page1.html

-- Albert


On Wednesday, November 19, 2003, at 12:55 PM, McDaniel, Joe wrote:


Enumerations using wsdl2java get created (in my opinion) brain-dead. Is
there a reason for (or a work around) the way that wsdl2java creates the
static final parameters with names like Color._value1, Color._value2,
etc. rather than something that could be useful such as Color.RED,
Color.BLUE, etc.?


Best,

Joe McDaniel





Reply via email to