Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 60398 invoked from network); 12 Apr 2004 06:24:15 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 12 Apr 2004 06:24:15 -0000 Received: (qmail 48189 invoked by uid 500); 12 Apr 2004 06:23:40 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 48062 invoked by uid 500); 12 Apr 2004 06:23:39 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 48028 invoked from network); 12 Apr 2004 06:23:37 -0000 Received: from unknown (HELO mail-hub.india.adventnet.com) (203.199.211.109) by daedalus.apache.org with SMTP; 12 Apr 2004 06:23:37 -0000 Received: from smtp.india.adventnet.com (smtp [192.168.4.41]) by mail-hub.india.adventnet.com (8.12.8/8.12.8) with ESMTP id i3C6NqPW029081 for ; Mon, 12 Apr 2004 11:53:52 +0530 Received: from adventnet.com (jagannath.india.adventnet.com [192.168.111.200]) by smtp.india.adventnet.com (8.12.3+3.5Wbeta/8.12.3/Debian-6.6) with ESMTP id i3C6NkK5002105 for ; Mon, 12 Apr 2004 11:53:47 +0530 Message-ID: <407A3791.1040004@adventnet.com> Date: Mon, 12 Apr 2004 12:00:41 +0530 From: jagannath Reply-To: axis-user@ws.apache.org, axis-user@ws.apache.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20031007 X-Accept-Language: en-us, en MIME-Version: 1.0 To: axis-user@ws.apache.org Subject: problems retrieving the value of ArrayList of Object Array Content-Type: multipart/mixed; boundary="------------070007070000050505050201" X-RAVMilter-Version: 8.4.3(snapshot 20030212) (mail-hub) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N This is a multi-part message in MIME format. --------------070007070000050505050201 Content-Type: multipart/alternative; boundary="------------070908040102070605060509" --------------070908040102070605060509 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Guys, Any update on this. Please help as this is urgent to me. Please let me know if any other information is required. Regards, Jagannath Hello Users, I am facing problems retrieving the value of ArrayList of Object Array using client stubs generated using WSDL2Java. The ObjectArray has just a string in it. I have a method in my WebService that returns an java.util.ArrayList of ObjectArray. For this I have written serializer for ArrayList and defined the ArrayOfObject in my wsdl file as shown below The ArrayList.java that is generated is attached with this mail. What is happening is I only get the String present in the last ObjectArray added in the ArrayList. When I have a ArrayList that contains String I am able to fetch all the values. For further reference please refer the tcpmon response for ArrayList of String and ArrayList of ObjectArray below ----------ArrayList with ObjectArray--------------- 33333333 222222222 334444444 ----------ArrayList with ObjectArray--------------- ----------ArrayList with String--------------- 33333333 222222222 334444444 ----------ArrayList with String--------------- I tried some debugging by putting print statements in the /setItem/ method of ArrayList stub. I found that for ArrayList with three Strings the method gets called three times with the Object[] passed having 1,2 and 3 elements it. That is in the third call the Object[] passed has all the 3 Strings in it. But for ArrayList with Object[] in it, though the setItem method gets called three times the Object[] passed has only one element in it. So only the last element gets stored in the ArrayList stub. Hope I am clear. I am using AXIS1.0 version. Is this an issue with AXIS or am I missing something. Please help as this is urgent to me. Thanks, -- ------------------------------------------------------- Jagannath.C AdventNet ManageEngine JMX Studio Off : 2243115 Extn:5252 Nortel: +91-925-895-6380 www.adventnet.com ------------------------------------------------------- --------------070908040102070605060509 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Guys,

Any update on this.

Please help as this is urgent to me.

Please let me know if any other information is required.

Regards,
Jagannath


Hello Users,

I am facing problems retrieving the value of ArrayList of Object Array using client stubs generated using WSDL2Java. The ObjectArray has just a string in it.

I have a method in my WebService that returns an java.util.ArrayList of ObjectArray. For this I have written serializer for ArrayList and defined the ArrayOfObject in my wsdl file as shown below

<complexType name="ArrayList">
    <all>
         <element name="item" minOccurs="0" maxOccurs="unbounded" type="xsd:anyType"/>
    </all>
</complexType>

<complexType name="ArrayOfObject">
    <complexContent>
                <restriction base="soapenc:Array">
                    <attribute ref="soapenc:arrayType" wsdl:arrayType="xsd:anyType[]"/>
                </restriction>
    </complexContent>
</complexType>

The ArrayList.java that is generated is attached with this mail.

What is happening is I only get the String present in the last ObjectArray added in the ArrayList. When I have a ArrayList that contains String I am able to fetch all the values.

For further reference please refer the tcpmon response for ArrayList of String and ArrayList of ObjectArray below

----------ArrayList with ObjectArray---------------

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <ns1:invokeResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://localhost:7001/jmx/soapServices/AdventNetSoapAgent">
   <invokeReturn href="#id0"/>
  </ns1:invokeResponse>
  <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:ArrayList" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:AdventNetSoapAgentTypes">
   <item xsi:type="ns2:ArrayOfObject">
    <item xsi:type="xsd:string">33333333</item>
   </item>
   <item xsi:type="ns2:ArrayOfObject">
    <item xsi:type="xsd:string">222222222</item>
   </item>
   <item xsi:type="ns2:ArrayOfObject">
    <item xsi:type="xsd:string">334444444</item>
   </item>
  </multiRef>
 </soapenv:Body>
</soapenv:Envelope>

----------ArrayList with ObjectArray---------------

----------ArrayList with String---------------

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <ns1:invokeResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://localhost:7001/jmx/soapServices/AdventNetSoapAgent">
   <invokeReturn href="#id0"/>
  </ns1:invokeResponse>
  <multiRef id="id0" soapenc:root="0" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xsi:type="ns2:ArrayList" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns2="urn:AdventNetSoapAgentTypes">
   <item xsi:type="xsd:string">33333333</item>
   <item xsi:type="xsd:string">222222222</item>
   <item xsi:type="xsd:string">334444444</item>
  </multiRef>
 </soapenv:Body>
</soapenv:Envelope>

----------ArrayList with String---------------

I tried some debugging by putting print statements in the setItem method of ArrayList stub.

I found that for ArrayList with three Strings the method gets called three times with the Object[] passed having 1,2 and 3 elements it. That is in the third call the Object[] passed has all the 3 Strings in it.

But for ArrayList with Object[] in it, though the setItem method gets called three times the Object[] passed has only one element in it. So only the last element gets stored in the ArrayList stub.

Hope I am clear.

I am using AXIS1.0 version.

Is this an issue with AXIS or am I missing something.

Please help as this is urgent to me.

Thanks,

--
Signature -------------------------------------------------------
Jagannath.C
AdventNet ManageEngine JMX Studio
Off : 2243115 Extn:5252
Nortel: +91-925-895-6380
www.adventnet.com
-------------------------------------------------------
--------------070908040102070605060509-- --------------070007070000050505050201 Content-Type: text/plain; name="ArrayList.java" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="ArrayList.java" /** * ArrayList.java * * This file was auto-generated from WSDL * by the Apache Axis WSDL2Java emitter. */ package AdventNetSoapAgentTypes; public class ArrayList implements java.io.Serializable { private java.lang.Object[] item; public ArrayList() { } public java.lang.Object[] getItem() { return item; } public void setItem(java.lang.Object[] item) { System.out.println("ArrayList: Inside setItem "+item.length); this.item = item; } public java.lang.Object getItem(int i) { return item[i]; } public void setItem(int i, java.lang.Object value) { this.item[i] = value; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof ArrayList)) return false; ArrayList other = (ArrayList) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = true && ((item==null && other.getItem()==null) || (item!=null && java.util.Arrays.equals(item, other.getItem()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = 1; if (getItem() != null) { for (int i=0; i