cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yiannis Mavroukakis <imavrouka...@gameaccountnetwork.com>
Subject Re: CXF/JAXB and nillable values
Date Thu, 14 Oct 2010 00:48:29 GMT
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 <dkulp@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
> dkulp@apache.org
> http://dankulp.com/blog
>

Mime
View raw message