You are viewing a plain text version of this content. The canonical link for it is here.
Posted to muse-commits@ws.apache.org by da...@apache.org on 2007/09/02 18:46:24 UTC

svn commit: r572026 - /webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/proxy/ReflectionProxyHandler.java

Author: danj
Date: Sun Sep  2 09:46:23 2007
New Revision: 572026

URL: http://svn.apache.org/viewvc?rev=572026&view=rev
Log:
Fix for MUSE-249 - adding more accurate check to see if return value should be serialized as an array

Modified:
    webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/proxy/ReflectionProxyHandler.java

Modified: webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/proxy/ReflectionProxyHandler.java
URL: http://svn.apache.org/viewvc/webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/proxy/ReflectionProxyHandler.java?rev=572026&r1=572025&r2=572026&view=diff
==============================================================================
--- webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/proxy/ReflectionProxyHandler.java (original)
+++ webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/proxy/ReflectionProxyHandler.java Sun Sep  2 09:46:23 2007
@@ -108,10 +108,14 @@
         // response body
         //
         Element child = XmlUtils.getFirstElement(xml);
+        Element[] subChildren = XmlUtils.getAllElements(xml);
         Class returnType = getReturnType();
         
-        if (child == null || returnType.isArray())
+        if (subChildren.length == 0 || (subChildren.length > 1 || returnType.isArray()))
             child = xml;
+        
+        else
+            child = subChildren[0]; 
         
         //
         // now we can deserialize the contents



---------------------------------------------------------------------
To unsubscribe, e-mail: muse-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-commits-help@ws.apache.org