I have not had time to work on these defects.

Let me re-state:

Issue 1: A List should be serialized as an array with arrayType
="xsd:anyType".
Status:  I will begin working on the fix (and a testcase) this evening.

Issue 2: Smart reflection needed on server-side to invoke service method
that has a List parameter.
Russell: Can you address think about this problem.

Rich Scheuerle
XML & Web Services Development
512-838-5115  (IBM TL 678-5115)


                                                                                       
                                               
                      Kamlesh Anvekar                                                  
                                               
                      <kanvekar@cascade        To:       "'[EMAIL PROTECTED]'" 
<[EMAIL PROTECTED]>                      
                      works.com>               cc:                                     
                                               
                                               Subject:  FW: Array Serializer and 
java.util.List                                      
                      03/07/2002 04:34                                                 
                                               
                      PM                                                               
                                               
                      Please respond to                                                
                                               
                      axis-user                                                        
                                               
                                                                                       
                                               
                                                                                       
                                               



Hi

Is This bug is fixed ????

kamlesh



-----Original Message-----
From: Vikram Rayabhari [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 28, 2002 12:32 AM
To: [EMAIL PROTECTED]
Subject: Re: Array Serializer and java.util.List


Hi Rich,

Thanks for the reply.

Isn't the expected xml element for a List - SOAP-ENC:Array with the
arrayType
set to xsd:anyType ?? Shouldn't a List be treated the same way as an
Object[] ?? Why should any
assumptions be made?? I think this is what any non-axis client also
expects.
Whether the List
contains objects of the same class or not, it should be treated the same
way. Please let me know
if I am wrong.

In fact, the current behavior causes the ArrayDeserializer also to break
down. By looking at the
arrayType information it expects all the child elements to be of the same
type and it is
surprised to find things to the contrary and currently it returns a null
for
the whole
SOAP-ENC:Array.

There is another small but related issue. A List passed from one side
always
comes out as an
Object[] on the other side. On the client side one could use
JavaUtils.convert and get it back
as a List. But on the server side it is a problem. Some smart reflection
has
to be done on the
service class when any of its methods use a List as a parameter.

Vikram

R J Scheuerle Jr wrote:

> Great observation!
>
> It makes sense to me that the component types of a List object should
> always be considered as an Object.
> The code should not look at the actual data to determine the type.  (The
> elements of the List could be missing, mixed or null).
>
> This is one of those situations where the serialization runtime does not
> have enough information to serialize the object.
> In this case, the javaType and the xmlType are both needed.  Since the
> current Axis runtime does not know the expected
> xmlType, it makes some big assumptions!

> I will run some experiments to see if any tests break.
>
> Any other comments?

> Rich Scheuerle
> XML & Web Services Development
> 512-838-5115  (IBM TL 678-5115)
>
>
>                       Vikram Rayabhari
>                       <vikram@yasutech.        To:
[EMAIL PROTECTED]
>                       com>                     cc:
>                                                Subject:  Array Serializer
and java.util.List
>                       02/27/2002 07:34
>                       AM
>                       Please respond to
>                       axis-user
>
>
>
> Hi,
>
> There seems to be a bug in ArraySerilizer when a list containing objects
> of different classes is serialized. The arrayType attribute is being set
> to the type of the first element in the list and not to xsd:anyType as
> would be expected.
>
> Could someone please clarify?
>
> thanks
> Vikram



Reply via email to