axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Gibbs <>
Subject Re: can't serialize arraylist
Date Thu, 06 Sep 2007 21:54:26 GMT
Mathias P.W Nilsson wrote:
> Any ideas? I really hope that I can send a object that has a collection of
> objects?
Just an idea, sorry, but I am an Axis newbie mself.  When I set up
similar a service my tool of choice (an Eclipse wizard) gave me warnings
saying something along the lines of "JAXB can't do <CollectionType>" 
where the type was simply List or Set.

I solved this by changing my DTOs to use arrays externally and to have
the getter convert an internal typed set or list to a typed array and
return a new instance of an array each time it was called. Each DTO then
simply required an add(Entity a) method for use by some type converter code.

Unfortunately it is early days for me still and I can promise this
approach is without issues. I imagine the first issue is that you are
using domain objects directly whereas my entities were not persistent at
all so their API was not really important to me.

By the way, you may like to check if this bug applies to your set up:

If it does you can email me off-list for a copy of a fixed axis.jar, or
check the comments.


View raw message