axis-java-dev mailing list archives

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

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1464

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
 Components: 
             Serialization/Deserialization
   Versions:
             1.2 Beta

   Assignee: 
   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

Description:
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>

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

Modify element :
      <xsd:complexType name="address">
        <xsd:all>
            <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"
/>
        </xsd:all>
      </xsd:complexType>

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

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

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

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

        addr1.setPersone_list(pl);

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.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


Mime
View raw message