Hi,
I have an XSD which has a attribute like below - <xsd:attribute name="field_id" type="xsd:unsignedByte" use="optional"/>
Now in my sample test.xml I have value of "151" or "155" for this attribute field_id.
I have written the below piece of code to read the test.xml and convert it to the java object. But when I run the program it gives me an error due to this value of 151 for the field_id attribute as shown below:
Is this a bug or a known issue, because as per XSD types definition, xsd:unsignedByte has valid values between 0 - 255. If i change the value of field_id to less than 127, it is working fine.
Any suggested workarounds???
----------------------------------------------------------- Exception in thread "main" java.lang.NumberFormatException: Value out of range. Value:"151" Radix:10 at java.lang.Byte.parseByte(Unknown Source) at java.lang.Byte.<init>(Unknown Source) at com.oob.schema.gen.JiBX_bindingMungeAdapter.JiBX_binding_unmarshalAttr_1_4() at com.oob.schema.gen.JiBX_bindingMungeAdapter.JiBX_binding_unmarshal_1_5() at com.oob.schema.gen.JiBX_bindingMungeAdapter.JiBX_binding_unmarshal_1_20() at com.oob.schema.gen.JiBX_bindingMungeAdapter.JiBX_binding_unmarshal_1_44() at com.oob.schema.gen.JiBX_bindingMungeAdapter.JiBX_binding_unmarshal_1_45() at com.oob.schema.gen.JiBX_bindingMungeAdapter.JiBX_binding_unmarshal_1_46() at com.oob.schema.gen.JiBX_bindingCboSchemaType_access.unmarshal() at org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement(UnmarshallingContext.java:2757) at org.jibx.runtime.impl.UnmarshallingContext.unmarshalDocument(UnmarshallingContext.java:2900) at com.test.TestMgr.main(TestMgr.java:24) -----------------------------------------------------------------------
|