Hi,
I am getting the NumberFormat exception while unmarshalling. Root of the problem seems to be empty element
Here are the details
public class MyexampleClass {
Integer INTEGER_FIELD;
Date DATE_FIELD;
...getter and setter methods
}
Binding file is
<mapping name="EXAMPLE_CLASS" class="examples.MyexampleClass ">
<structure name="INTEGER_FIELD">
<value usage="optional" style="text" field="INTEGER_FIELD"></value>
</structure>
<structure name="DATE_FIELD">
<value usage="optional" style="text" field="DATE_FIELD"
serializer="examples.CustomDateMarshallerUnmarshaller.serialize"
deserializer="examples.CustomDateMarshallerUnmarshaller.deserialize">
</value>
</structure>
</mapping>
My data file is
<EXAMPLE_CLASS>
<INTEGER_FIELD/>
<DATE_FIELD/>
</EXAMPLE_CLASS>
When I both the fields are empty I get NumberFormatException for input string "" for integer.
But if INTEGER_FIELD is set to some integer it works fine because for Date I have custom marshaller unmarshaller.
Why don't empty tags in case of Integer works even if I have specified usage="optional" in my binding file
Please suggest me? Help me
Regards,
Paras
--
Paras Jain
Software Engineer
Cell - +91-9329427774
- [jibx-users] Problems in unmrashalling without custom dese... Paras Jain
- Re: [jibx-users] Problems in unmrashalling without cu... Dennis Sosnoski
