You could use an aegis file to mark it as ignore or as nillable.   If it
is only used by hibernate and you never want your client to see it then
mark as ignore, otherwise set it to nillable.
http://xfire.codehaus.org/Aegis+Binding

___________________________________________

Gavin Hogan
Programmer/Analyst
The State University of New York
State University Plaza
Albany, NY 12246
Phone 518-443-5481
fax 518-443-5809
e-mail [EMAIL PROTECTED] 

-----Original Message-----
From: Matthew Kerle [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 24, 2007 9:06 AM
To: [email protected]
Subject: Re: [xfire-user] "collection is nil, but not nillable" error
message


Apologies, it's not related to array types, 'collection' was an 
attribute of the parameter bean. turns out that was the first null field

in the bean. This is the only web method in my web service that takes a 
javabean so I hadn't encountered this problem before.

This bean is used by hibernate to query a database, is there any way I 
can define it's attributes as nillable? Otherwise I'll have to assign 
default non-null values to it's attributes, which will complicate my
DAO...

much thanks to anyone with a good idea for a solution (or links!!)

Matthew Kerle wrote:
> Hi, I'm passing a query object to a web service that executes a search
> in hibernate.
>
> public class ImageSearch {
>    ... //lots of String attributes
>    public String [] keywords; //3 of this type
>    ...//more String & Integer attributes
>    ... //lots of getter/setters.
> }
>
> The query object has 3 attributes that are arrays of Strings
> (multi-valued lookups), and I'm getting the following error as xFire 
> parses the request and maps it back to a bean. I want the arrays to be

> allowed to be null, how can I set this?
>
> server:
> INFO: Fault occurred!
> org.codehaus.xfire.fault.XFireFault: collection is nil, but not 
> nillable.                                                          
> <<<<<<<<<<<  "collection is nil, but not nillable"
>    at
>
org.codehaus.xfire.aegis.type.basic.BeanType.readObject(BeanType.java:17
4) 
>
>    at
>
org.codehaus.xfire.aegis.AegisBindingProvider.readParameter(AegisBinding
Provider.java:169) 
>
>    at
>
org.codehaus.xfire.service.binding.AbstractBinding.read(AbstractBinding.
java:206) 
>
>    at
>
org.codehaus.xfire.service.binding.WrappedBinding.readMessage(WrappedBin
ding.java:51) 
>
>    at
>
org.codehaus.xfire.soap.handler.SoapBodyHandler.invoke(SoapBodyHandler.j
ava:42) 
>
>    at
>
org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:1
31) 
>
>    at
>
org.codehaus.xfire.transport.DefaultEndpoint.onReceive(DefaultEndpoint.j
ava:64) 
>
>    at
>
org.codehaus.xfire.transport.AbstractChannel.receive(AbstractChannel.jav
a:38) 
>
>    at
>
org.codehaus.xfire.transport.http.XFireServletController.invoke(XFireSer
vletController.java:304) 
>
>    at
>
org.codehaus.xfire.transport.http.XFireServletController.doService(XFire
ServletController.java:129) 
>
>    at
>
org.codehaus.xfire.transport.http.XFireServlet.doPost(XFireServlet.java:
116) 
>
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>



---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to