java - Jaxb creates BigInteger variable for elements attribute -


i working on java application company among other things takes xml have schema input.

ide: netbeans 8.0 java: jdk 1.6 (i know, know...)

in schema 1 of element types has 2 attributes requiered:

<xs:complextype name="inserttype">   <xs:attribute name="id" type="nametype" use="required" />   <xs:attribute name="priority" type="xs:int" use="required" /> </xs:complextype> 

now generated class complextype looks this:

public class inserttype {      @xmlattribute(name = "id")     protected string id;     @xmlattribute(name = "priority")     protected biginteger priority;     ... } 

naming conventions xml attribute names aside (i got schema , naming convention 1 of feedback topics), why "biginteger" here datatype "priority"? original schema received looked "priority"

<xs:attribute name="priority" type="xs:integer" use="optional"> 

so can see why xs:integer plus "optional" trigger "biginteger" generation, changed type "xs:int" , use required, gathered equivalent "minoccurs='1'" (hopefully) solve problem element.

does have idea should next? @ loss here , google hits found pointed usage of "xs:int" instead of "xs:integer" , "minoccurs='1'".

thank you

edit: forgot mention, , might essential, binding created 2 schemas, 1 including other. first or main schema describes overall architecture of xml. second consists of type definitions used. since first contains type-definitions split between 2 not necessary. can have above mentioned problem?

ok, after working through details again found answer myself. wondering why none of changes attribute reflected in generated classes, changed annotations well. changes not reflected in generated classes after deleted build directory of project.

the solution, plain , simple (and embarrassed admit that) delete netbeans cache folder (found in c:\users\\\\netbeans\cache\8.0), restart netbeans , have classes generated again.


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -