You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by am...@apache.org on 2010/04/29 15:59:57 UTC

svn commit: r939310 - /axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java

Author: amilas
Date: Thu Apr 29 13:59:56 2010
New Revision: 939310

URL: http://svn.apache.org/viewvc?rev=939310&view=rev
Log:
fixed the issue AXIS2-4615

Modified:
    axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java

Modified: axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java?rev=939310&r1=939309&r2=939310&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java (original)
+++ axis/axis2/java/core/trunk/modules/adb/src/org/apache/axis2/databinding/utils/BeanUtil.java Thu Apr 29 13:59:56 2010
@@ -303,7 +303,15 @@ public class BeanUtil {
                 ArrayList valueList = new ArrayList();
                 Class arrayClassType = beanClass.getComponentType();
                 if ("byte".equals(arrayClassType.getName())) {
-                    return Base64.decode(beanElement.getFirstElement().getText());
+                    // find the part first and decode it
+                    OMElement partElement = null;
+                    for (Iterator iter = beanElement.getChildElements(); iter.hasNext();){
+                        partElement = (OMElement) iter.next();
+                        if (partElement.getLocalName().equals(arrayLocalName)){
+                            break;
+                        }
+                    }
+                    return Base64.decode(partElement.getText());                    
                 } else {
                     Iterator parts = beanElement.getChildElements();
                     OMElement omElement;