Hi Dennis,
Glad to hear from you. I have created a bug report as you suggested.
Arthur Vernon, from IST Networks, also kindly pointed out this.
http://jira.codehaus.org/browse/JIBX-157
regards
Varghese
Dennis Sosnoski wrote:
Hi Varghese,
I'd appreciate it if you'd enter a Jira bug report for this issue. That
way I'll make sure I don't forget about it.
Thanks,
- Dennis
Dennis M. Sosnoski
SOA and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
Varghese C V wrote:
Enum value types during unmarshall throw null pointer exceptions if
optionally mapped.
Eg :
enum Day{
Mon,
Tue,
;
}
Binding
<binding>
<mapping ...>
<value name="day" field="day" usage="optional"/>
</mapping>
</binding>
A work around is to define custom deserializers per enum.(I put the
static deserializer methods in the enum itself)
ie <value name="day" field="day" usage="optional"
deserializer="EnumConversion.deserializeDayEnum"/>
class EnumConversion{
public static Day deserializeDayEnum(String str) {
if(str == null) {
return null;
} else {
return Day.valueOf(str);
}
}
}
regards
Varghese C V
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users