Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 99990 invoked from network); 5 Sep 2008 09:05:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 5 Sep 2008 09:05:50 -0000 Received: (qmail 42825 invoked by uid 500); 5 Sep 2008 09:05:48 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 42707 invoked by uid 500); 5 Sep 2008 09:05:48 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 42698 invoked by uid 500); 5 Sep 2008 09:05:48 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 42695 invoked by uid 99); 5 Sep 2008 09:05:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Sep 2008 02:05:48 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Sep 2008 09:04:58 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 4C82B238896C; Fri, 5 Sep 2008 02:05:29 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r692388 - in /webservices/axis2/trunk/java/modules/adb: src/org/apache/axis2/databinding/utils/ src/org/apache/axis2/databinding/utils/reader/ test/org/apache/axis2/databinding/utils/reader/ Date: Fri, 05 Sep 2008 09:05:28 -0000 To: axis2-cvs@ws.apache.org From: amilas@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080905090529.4C82B238896C@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: amilas Date: Fri Sep 5 02:05:26 2008 New Revision: 692388 URL: http://svn.apache.org/viewvc?rev=692388&view=rev Log: fixed issue regarding parsing and serializing the multidimentional arrays given directly under service method Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderImpl.java webservices/axis2/trunk/java/modules/adb/test/org/apache/axis2/databinding/utils/reader/ADBXMLStreamReaderTest.java Modified: webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=692388&r1=692387&r2=692388&view=diff ============================================================================== --- webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java (original) +++ webservices/axis2/trunk/java/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Fri Sep 5 02:05:26 2008 @@ -28,6 +28,7 @@ import org.apache.axis2.context.MessageContext; import org.apache.axis2.databinding.typemapping.SimpleTypeMapper; import org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl; +import org.apache.axis2.databinding.utils.reader.ArrayObjectWrapper; import org.apache.axis2.deployment.util.BeanExcludeInfo; import org.apache.axis2.description.AxisService; import org.apache.axis2.description.java2wsdl.TypeTable; @@ -95,43 +96,6 @@ return name; } - /** - * this method recursively search for all the supper classes to exclude the exclude bean info - * @param beanClass - * @param axisService - * @return - * @throws IntrospectionException - */ - private static List getPropertiesToSerialize(Class beanClass, - AxisService axisService) - throws IntrospectionException { - List propertiesToSerialize = null; - Class supperClass = beanClass.getSuperclass(); - - if (!getQualifiedName(supperClass.getPackage()).startsWith("java.")){ - propertiesToSerialize = getPropertiesToSerialize(supperClass, axisService); - } else { - propertiesToSerialize = new ArrayList(); - } - - BeanExcludeInfo beanExcludeInfo = null; - if (axisService != null && axisService.getExcludeInfo() != null) { - beanExcludeInfo = axisService.getExcludeInfo().getBeanExcludeInfoForClass(beanClass.getName()); - } - BeanInfo beanInfo = Introspector.getBeanInfo(beanClass, beanClass.getSuperclass()); - PropertyDescriptor[] properties = beanInfo.getPropertyDescriptors(); - PropertyDescriptor property = null; - for (int i = 0; i < properties.length; i++) { - property = properties[i]; - if (!property.getName().equals("class")) { - if ((beanExcludeInfo == null) || !beanExcludeInfo.isExcludedProperty(property.getName())) { - propertiesToSerialize.add(property); - } - } - } - return propertiesToSerialize; - } - private static List getPropertyQnameList(Object beanObject, Class beanClass, QName beanName, @@ -368,12 +332,13 @@ Object objValue = parts.next(); if (objValue instanceof OMElement) { omElement = (OMElement)objValue; - if (!arrayLocalName.equals(omElement.getLocalName())) { + if ((arrayLocalName != null) && !arrayLocalName.equals(omElement.getLocalName())) { continue; } + // this is a multi dimentional array so always inner element is array Object obj = deserialize(arrayClassType, omElement, - objectSupplier, arrayLocalName); + objectSupplier, "array"); valueList.add(obj); } @@ -737,39 +702,46 @@ objects.add(arg); continue; } - //todo if the request parameter has name other than argi (0" + - "Some Text 0" + - "Some Text 1" + - "Some Text 2" + - "Some Text 3" + + "Some Text 0" + + "Some Text 1" + + "Some Text 2" + + "Some Text 3" + ""; ArrayList propertyList = new ArrayList(); @@ -465,10 +465,10 @@ try { String expectedXML = "" + - "Some Text 0" + - "" + - "Some Text 2" + - "Some Text 3" + + "Some Text 0" + + "" + + "Some Text 2" + + "Some Text 3" + ""; ArrayList propertyList = new ArrayList(); @@ -515,10 +515,10 @@ "25" + "Male" + "" + - "Some Text 0" + - "Some Text 1" + - "Some Text 2" + - "Some Text 3" + + "Some Text 0" + + "Some Text 1" + + "Some Text 2" + + "Some Text 3" + "Some More Text" + ""; @@ -567,11 +567,11 @@ String expectedXML = "" + - "Some Text 0" + - "" + - "Some Text 2" + - "Some Text 3" + + "Some Text 0" + + "" + + "Some Text 2" + + "Some Text 3" + ""; ArrayList propertyList = new ArrayList();