axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [jira] Created: (AXIS-1464) Wrong arrays deserialisation (all elements equal to each other)
Date Tue, 20 Jul 2004 08:54:39 GMT

  A new issue has been created in JIRA.

View the issue:

Here is an overview of the issue:
        Key: AXIS-1464
    Summary: Wrong arrays deserialisation (all elements equal to each other)
       Type: Bug

     Status: Unassigned
   Priority: Critical

    Project: Axis
             1.2 Beta

   Reporter: An Tin

    Created: Tue, 20 Jul 2004 1:53 AM
    Updated: Tue, 20 Jul 2004 1:53 AM
Environment: java 1.4 / Win 2000

1) Modify example Address Book (folder samples\addr in standard destribution.

File AddressBook.wsdl :

Add elements : 
     <xsd:complexType name="persone">
      <xsd:attribute name="firstname" type="xsd:string"/>
      <xsd:attribute name="name" type="xsd:string"/>

     <xsd:complexType name="persone_list">
        <xsd:element name="persone" type="typens:persone" minOccurs="0" maxOccurs="unbounded"/>

Modify element :
      <xsd:complexType name="address">
            <xsd:element name="streetNum" type="xsd:int"/>
            <xsd:element name="streetName" type="xsd:string"/>
            <xsd:element name="city" type="xsd:string"/>
            <xsd:element name="state" type="typens:stateType"/>
            <xsd:element name="zip" type="xsd:int"/>
            <xsd:element name="phoneNumber" type="typens:phone"/>
            <xsd:element name="persone_list" type="typens:persone_list" minOccurs="0" maxOccurs="1"

File : in section STATIC add Object "Persone_list" with 2 objects "Persone" inside
(line 58)

        Persone p1= new Persone();
         p1.setName("N 111");

         Persone p2= new Persone();
          p2.setName("N 222");

        Persone_list pl = new Persone_list();
          pl.setPersone(new Persone[]{p1,p2});


Change method "printAddress" to print also object "Persone_list" :
 Persone_list pl = ad.getPersone_list();
        for(int i=0;i<pl.getPersone().length;i++){
         System.out.println("Persone "+i+" : "+pl.getPersone()[i].getFirstname());

2) Run the example . 
   There are 2 elements "Persone" inside of "Persone_list" on client side. We send these objects
to server and get tham back.

(!!!) Instead of 2 different objects there are in array 2 copies of the the second object.

So output for this test we have for objects "Persone":

Persone 0 : 222
Persone 1 : 222

Must be :

Persone 0 : 111
Persone 1 : 222 

3) This bug is stable. I found it ini another application and modifyed example application
to demonstrate it. 
4) Problem happens during deserialisation as I found out by printing objects in client and
server sides as XML.

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

View raw message