axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepal Jayasinghe <dee...@opensource.lk>
Subject Re: send an object containing a java.util.List
Date Wed, 06 Dec 2006 15:28:17 GMT
Hi Benoit ;

Seems like bug in the code rather missing part :) , so please create a
JIRA I will fix that before next release:

Thanks
Deepal

> 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 checked the code, and I saw 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 works fine. So why
> 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.rd.yahoo.com/evt=42054/*http://fr.answers.yahoo.com>.


-- 
Thanks,
Deepal
................................................................
"The highest tower is built one brick at a time"



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message