Does the BeanSerializer support indexed properties?

So if I have:

MyObject[] myObjects;

MyObject[] getMyObjects() {
        return this.myObjects;
}

inside my class, will the BeanSerializer automatically handle it? It doesn't
seem to (it ignores that field completely in both the WSDL generation and
serialization), so I'm trying to find out what I need to do to make it work.
I ran a test of:

        Class javaType = MyObject.class;
        TypeDesc typeDesc = TypeDesc.getTypeDescForClass(javaType);
        BeanPropertyDescriptor[] pds = BeanUtils.getPd(javaType, typeDesc);
        for (int i=0; i<pds.length; i++) {
            System.out.println(pds[i].getName());
        }

And noticed that these utilities (this is what BeanSerializer uses
internally to get the fields) don't return the myObjects field at all, so
apparently the problem is that either I'm not conforming to what BeanUtils
expects for the bean paradigm (which wouldn't surprise me--anyone know what
I need to do different?) or BeanUtils isn't working quite right.

Thanks,

Joel Shellman

Reply via email to