Please log a bug report. if you want a work around for now...try
public String[] getStringArray() { return (_ar == null) : new
String[0] : _ar; }
-- dims
On 11/15/06, javaDev <[EMAIL PROTECTED]> wrote:
Hi
Is the array-type bean property allowed to be null in Axis2-1.1? I try to
return from my service an object containing the String[] field. In case this
field is null I receive the exception:
*****
Caused by: java.lang.NullPointerException
at java.lang.reflect.Array.getLength(Native Method)
at
org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:120)
at
org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.processProperties(ADBXMLStreamReaderImpl.java:948)
at
org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXMLStreamReaderImpl.java:802)
*****
Does it mean that the NULL is not an allowed value for array - and I must
return the zero-size array instead?
Details:
the service is the standard axis sample:
sample.addressbook.service.AddressBookService. The change is the added a
String[] field to the Entry type:
class Entry {
.....
public String[] getStringArray() { return _ar; }
public void setStringArray(String[] array){_arr = stringArray;}
}
Sincerely,
Alex.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]