This is per JAXB spec.  However, we have a nice plugin to xjc to have it 
generate getters as well.  See:


http://cxf.apache.org/cxf-xjc-boolean.html


Dan


On Thursday, July 07, 2011 2:43:09 PM Jeremy Robertson wrote:
> I used CXF 2.4.1 wsdl2java to generate client code for a web service. One of
> the generated objects has a Boolean field, and the code generated for it
> was like the example below:
> 
> class Foo {
>                 protected Boolean baz;
> 
>                 public Boolean isBaz()...
> public void setBaz(Boolean value)...
> }
> 
> The problem is that another project is using this client with Spring and
> Java EL to set the field in a jsp page:
> 
> <form:checkbox path="baz" id="baz" />
> 
> According to the Java EL rules (so I'm told), a Boolean object uses "get"
> and "set" method notation, not "is" and "set". The latter is apparently
> only for the primitive boolean.
> 
> Is there a way I can modify the generation of code to use the get and set
> form, or do I need to adjust the code manually after the fact?
> 
> 
> Thanks,
> Jeremy
> 
> 
>  NOTICE: This email message is for the sole use of the intended recipient(s)
> and may contain confidential and privileged information. Any unauthorized
> review, use, disclosure or distribution is prohibited. If you are not the
> intended recipient, please contact the sender by reply email and destroy
> all copies of the original message.
-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to