Hi Guillaume,
i is an Integer, not a String than I can't set
p.i="";
because I'll have a compiling a exception.
Any other?
----- Original Message -----
From: "Guillaume Nodet" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, April 25, 2008 1:20 PM
Subject: Re: return null values
What if you set
p.i = "";
This should give you an empty element, but remember that in xml, <i/>
and <i></i> are exactly the same, so you won't be able to do any
difference using that.
I guess you could expect
<i xsi:nil="true" />
or something like that. It may require a nillable annotation on the i
field or something like that. If you use jaxb2, you'd better try
finding some info there.
On Fri, Apr 25, 2008 at 1:04 PM, Simone Maletta <[EMAIL PROTECTED]>
wrote:
Hi guys,
I'm using ServiceMix 3.1.2 and its jsr181 to deploy my own
ws-annotated pojo.
I need to return null values in my code, I'm using an example to be
clear:
here is my return type object:
class returnType
{
String h;
Integer i;
}
and this is my code:
p=new returnType();
p.h="goofy";
p.i=null;
and here is the generated response message:
<returnType>
<h>goofy</h>
<returnType>
while I need
<returnType>
<h>goofy</h>
<i/>
<returnType>
there is a way to achive this??
I forget returnType is annotated too.
Thank you all,
regards
Simone
<returnType>
--
Cheers,
Guillaume Nodet
------------------------
Blog: http://gnodet.blogspot.com/