I don't believe it's so much wsdl2java ignoring the defaults as JAXB ignoring them (we use Oracle's JAXB reference implementation). JAXB does not implement 100% of XML Schema, including default values. You might have more luck with the XMLBeans databinding option.

Glen

On 12/09/2011 03:15 PM, rouble wrote:
Hi All,

Is there a way to use jaxb annotations and/or wsdl2java to generate
classes with default initializations?

Today, CXF's wsdl2java is ignoring an elements default initialization.
So, something like:
<xs:element default="true" name="bar" type="xs:boolean"/>

Does not get reflected in the class as an initialization value.

I have a thread on SO discussing the topic:
http://stackoverflow.com/questions/8434963/default-initialization-value-for-jaxb-generated-class

tia,
rouble


--
Glen Mazza
Talend Community Coders
http://coders.talend.com
blog: http://www.jroller.com/gmazza

Reply via email to