axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Scott Lamb <>
Subject Re: Collections classes?
Date Mon, 04 Jul 2005 05:56:13 GMT
On 3 Jul 2005, at 19:09, James Black wrote:

> Scott Lamb wrote:
>> I still do not understand. Why can't I serialize a List with exactly
>> the same XML representation as an array? And deserialize it back to a
>> List? Why does the other side have to know anything about this?
>  A list has other attributes besides an array, as it has to know
> something about order and relationships between items.

This is nonsense. I don't know the intricacies of SOAP or Axis, but I  
know what arrays and lists are.

A list is an ordered collection of items.

An array is an indexed collection of items. Indexed implies ordered.  
Thus, an array is a specialization of list. (In Java, there is an  
ArrayList class. A list represented in memory by an array. It  
supports the exact same operations as LinkedList; the only difference  
is the complexity of some operations. I.e., get(int n) is O(1)  
instead of O(n).)

Their serialization is the same; you'd write an array in order of  
ascending indexes.

Scott Lamb <>

View raw message