Dmitri,
thanks for your feedback. I don't think that altering the build process is a good alternative in my case, because it would require a lot of maintenance as my schema changes.
Does anybody else have any ideas on how to address this issue?
Thanks.
Dmitri Colebatch <dim_at_colebatch.com> wrote: Yeah I understand the problem, just not the solution (o:
I reckon if I was in your position I'd be hacking something into my
build to copy and modify the schema before JAXB got to it so that JAXB
outputs what you want.
Sorry I cant offer any useful advice.
cheers
dim
On 5/18/06, Alec Swan wrote:
> I did look through the docs, but wasn't able to find anything helpful.
>
> In reality, the only thing I am trying to accomplish is that for a given
> schema element, JAXB generates a getter and a setter methods, which
> respectively return and take the SAME type of objects.
>
> Here is an example: if I have a schema element E with type "xs:boolean"
> which is optional and has a default value specified, then JAXB will generate
> the following getter and setter methods for this element:
> public boolean getE() {
> ...
> }
>
> public void setE(Boolean v) {
> ...
> }
>
> Note that the getter method returns a primitive type and the setter method
> takes a wrapper class as a parameter. I need both of these methods to
> operate on the boolean type.
>
> However, if I change the XML element to have NO default value, but still be
> optional, then JAXB generates what I want. But I need this element to be
> optional with a default value.
>
> Any ideas?
>
> Thanks.
>
>
> Dmitri Colebatch wrote:
> Hi
>
>
> On 5/18/06, Alec Swan wrote:
> > Is there a way to force JAXB to generate methods that do NOT take or
> return
> > primitive values as parameters. For example, how do I force JAXB to ALWAYS
> > map "boolean" xml type to java.lang.Boolean java type?
> >
> > Also, does anybody have any ideas on the following?
>
> Not me sorry - I assume you've looked through the binding file option?
> I would have guessed that you might be able to override it there, but
> I've never tried to do what you're doing.
>
> Good luck!
>
> cheers
> dim
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net