cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yiannis Mavroukakis <>
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!



On 13 October 2010 22:08, Daniel Kulp <> 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

View raw message