You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Ch...@sybase.com on 2008/05/02 20:40:52 UTC
Generated method signatures
I'm using the wsdl2java to generate my objects but an issue I hit was
using those objects with JSF 1.1. One getter method with a Boolean data
type is generated as isOrderFlag(), (which I know is correct) but JSF
doesn't like it. It seems JSF can only find the method if it is
getOrderFlag(). Is there a way that I can tell JAXB to generate methods
for Boolean data types as get methods instead of is methods?
Thanks for the help...
Chris
Re: Generated method signatures
Posted by Ch...@sybase.com.
Found my answer. It's true that JSF only supports isXXX methods when the
data type is primitive boolean. If the data type is Boolean wrapper then
JSF expects the method to be getXXX. To get JAXB to convert these methods
to use the primitive data type you must use the following annotation on
your server side objects:
@XmlElement(required = true, nillable = false)
private Boolean someValue;
This tells JAXB that the field is required and the schema will be defined
with minOccurs="1" for that field. This will cause the generated classes
to use the primitive boolean data type. (It makes sense)
Chris
Christopher.Mathrusse@sybase.com
05/02/2008 11:49 AM
Please respond to
users@cxf.apache.org
To
users@cxf.apache.org
cc
Subject
Re: Generated method signatures
Looking through the JSF forum it seems is methods only work with the
primitive boolean and not the Boolean wrapper. For Boolean wrapper methods
must be get and set. Can I tell JAXB to use primitive boolean instead in
my binding file?
Thanks...
Chris
Christopher.Mathrusse@sybase.com
05/02/2008 11:40 AM
Please respond to
users@cxf.apache.org
To
users@cxf.apache.org
cc
Subject
Generated method signatures
I'm using the wsdl2java to generate my objects but an issue I hit was
using those objects with JSF 1.1. One getter method with a Boolean data
type is generated as isOrderFlag(), (which I know is correct) but JSF
doesn't like it. It seems JSF can only find the method if it is
getOrderFlag(). Is there a way that I can tell JAXB to generate methods
for Boolean data types as get methods instead of is methods?
Thanks for the help...
Chris
Re: Generated method signatures
Posted by Ch...@sybase.com.
Looking through the JSF forum it seems is methods only work with the
primitive boolean and not the Boolean wrapper. For Boolean wrapper methods
must be get and set. Can I tell JAXB to use primitive boolean instead in
my binding file?
Thanks...
Chris
Christopher.Mathrusse@sybase.com
05/02/2008 11:40 AM
Please respond to
users@cxf.apache.org
To
users@cxf.apache.org
cc
Subject
Generated method signatures
I'm using the wsdl2java to generate my objects but an issue I hit was
using those objects with JSF 1.1. One getter method with a Boolean data
type is generated as isOrderFlag(), (which I know is correct) but JSF
doesn't like it. It seems JSF can only find the method if it is
getOrderFlag(). Is there a way that I can tell JAXB to generate methods
for Boolean data types as get methods instead of is methods?
Thanks for the help...
Chris