On Wednesday 27 February 2008, Brad Harper wrote:
Can this be done using JAXB? These nillable attributes are the bane
of my existence... Is there anyway to make them go away?
Depends on where in the schema and who is generating them
The nillables in the actual java beans that you return can be removed by
adding nillable=false to the @XmlElement declaration in the beans.
The nillables in the wrapper elements/types that are created by CXF can
only be removed by writing wrapper beans that have the nillable=false
and using the @RequestWrapper annotations to point at the wrappers.
This can be made easier with 2.1 by using the java2ws tool with
the -wrapperbean flag to generate the initial versions that you can
modify.
Dan
On Tue, Feb 5, 2008 at 1:12 PM, Benson Margulies
[EMAIL PROTECTED]
wrote:
On Tue, 2008-02-05 at 07:55 -0800, yulinxp wrote:
This section explains how to set Default minOccurs and nillable
Parameters
using Java API.
Is there anyway we could do it through xml file?
http://cwiki.apache.org/CXF20DOC/aegis-databinding.html
Start from here, and add a Configuration bean to the
AegisDatabinding.
simple:server id=aegis-service
serviceClass=
org.apache.cxf.javascript.fortest.AegisService
address=http://localhost:8808/aegis;
simple:serviceBean
bean
class=
org.apache.cxf.javascript.fortest.AegisServiceImpl /
/simple:serviceBean
simple:dataBinding
bean
class=
org.apache.cxf.aegis.databinding.AegisDatabinding
/bean
/simple:dataBinding
simple:serviceFactory
bean
class='
org.apache.cxf.service.factory.ReflectionServiceFactoryBean'
property name=properties
map
entry
key=overrideTypesList
list
value org.apache.cxf.javascript.fortest.aegis.Mammal/value
/list
/entry
/map
/property
/bean
/simple:serviceFactory
/simple:server
--
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog