Hi,

I want to create a service which return an object containing a List:

The object to return: 
public class Container {
  private List myList = new ArrayList();

  public List getList() {
    return myList;
  }
}

The service (pojo) :
public class MyService {
  private Container container = new Container();

  public Container getContainer() {
    container.getList().add("a test");
    return container;
  }
}

When I try to access the service I receive an Exception:
Caused by: java.lang.IllegalArgumentException: null rcl
        at 
org.codehaus.jam.internal.reflect.ReflectClassBuilder.<init>(ReflectClassBuilder.java:47)
        at 
org.codehaus.jam.provider.JamServiceFactoryImpl.createBuilder(JamServiceFactoryImpl.java:173)


I check the code, and I saw that in the class 
org/apache/axis2/databinding/utils/BeanUtil, The only object I can use to send 
a list is the ArrayList. Why ?
I change the isArrayList method in 
org/apache/axis2/databinding/typemapping/SimpleTypeMapper to detect a 
java.util.List instead of just the ArrayList and it work fine. So why just 
limit to ArrayList (and not just Collection)? 

Thanks,
Benoit








        

        
                
___________________________________________________________________________ 
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions ! 
Profitez des connaissances, des opinions et des expériences des internautes sur 
Yahoo! Questions/Réponses 
http://fr.answers.yahoo.com

Reply via email to