On 2010-11-15, at 下午4:05, Jaco Prinsloo wrote:
Hi,
I have an element which is annotated as given below:
@XmlElement(name = "Items", nillable = false, required = false)
public String[] getItems() {
return items;
}
Hi,
How about change nillable=true to see if it helps?
Freeman
It generates fine when it contains items, and generates an empty
element
when it does not:
<ns2:Items />
Is there any way that I can configure Apache CXF to exclude this
element
when it is empty, in other words, not to generate anything for it?
Thank you,
Jaco
--
Freeman Fang
------------------------
FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org