Customizing jaxb bindings for primtive

Viewed 1294

I have several schemas I am generating jaxb bindings for that make liberal use of xs:integer. I wish to have these values bound to long/Long rather than the default BigInteger. Unfortunately I do not have the ability to modify the schemas. Adding a simple declaration to my bindings file causes xs:integer to be bound to Long in all cases, even when it's a required value:

<jaxb:javaType xmlType="xs:integer" name="long" />

How can I get xs:integer to be bound to a primitive when the field is required?

1 Answers
Related