Hi Daniel, Aah yes silly me of course, the presence of the element indicates an empty value!
Thanks, Yiannis On 13 October 2010 22:08, Daniel Kulp <dk...@apache.org> wrote: > On Wednesday 13 October 2010 2:40:13 pm Yiannis Mavroukakis wrote: >> Hello everyone :) >> I've got a question with regards to nillable values. I've looked >> around and I've noticed that most people's solution >> is to use the nillable attribute in their schema. However, I'm taking >> a code first approach, so what I've tried to do is >> to add @XmlElement(nillable=true) to either of the accessor methods on >> the class. Unfortunately >> the attribute in question (a String) still keeps getting unmarshalled >> to an empty value instead. >> Is anyone aware of a workaround in code? > > The question is what does it look like on the wire? You would need to use > wireshark or logging or something to capture the on the wire message and look > at it. If it's something like <mystring/>, then that is properly an empty > string. > -- > Daniel Kulp > dk...@apache.org > http://dankulp.com/blog >