> -----Ursprüngliche Nachricht-----
> Von: Daniel Kulp [mailto:[email protected]]
> Gesendet: Dienstag, 18. Mai 2010 22:40
> An: [email protected]
> Cc: Jürgen Bockhorn
> Betreff: Re: defaultValue-Plugin does not work
> 
> On Tuesday 18 May 2010 10:34:44 am Jürgen Bockhorn wrote:
> 
> > Following code has been generated:
> >
> >
> >     @XmlElement(required = true)
> >     protected String tagName;
> >     @XmlElement(required = true)
> >     protected String value;
> >     @XmlElement(required = true)
> >     protected StringComparator comparator;
> >     @XmlElement(defaultValue = "false")
> >     protected boolean caseSensitiv;
> >
> > I expected that it should be
> >     protected boolean caseSensitiv=false;
> >
> > What went wrong ?
> 
> Can you check with a default value of true to see if that changes
> anything?
> Also, check the getter method.   That's normally where it sticks the
> logic for
> the defaults.    That said, with primitives and not minOccurs=0, I
> don't think
> that actually works.   I'd like to see what it's generating there.
> This may
> be a bug in the primitive handle.
> 
[JB:] 
Hi Dan,

with true it also doesn't work. If I set minOccurs="0" the getter shows the 
default handling.

   /**
     * Gets the value of the caseSensitiv property.
     * 
     */
    public Boolean isCaseSensitiv() {
        if (null == caseSensitiv) {
            return (Boolean.TRUE);
        } else {
            return caseSensitiv;
        }
    }


> 
> > By the way. Is there a way to use other JAXB2 Plugins like the
> 'Equals
> > plugin' or the 'HashCode plugin'
> 
> Convince them to donate the code to CXF so we can publish it properly
> to Maven
> repos?   Other than that, it's not easy.  You would need to get the
> jars and
> deploy them locally and such.  Not fun.
[JB:] 

Does this mean, that wsdl2java is routing every -xjc-X parameter through to xjc 
? 
Or do I have to use another syntax ?

> 
> Dan
> 
> >
> > Regards,
> >
> > Jürgen
> 
> --
> Daniel Kulp
> [email protected]
> http://dankulp.com/blog

Reply via email to