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/02/28 01:50:27 UTC
svn commit: r512531 -
/webservices/muse/trunk/modules/muse-core/src/org/apache/muse/core/proxy/ReflectionProxyHandler.java
Author: danj
Date: Tue Feb 27 16:50:26 2007
New Revision: 512531
URL: http://svn.apache.org/viewvc?view=rev&rev=512531
Log:
Fix for MUSE-202 - added check to our serialize() hack to make sure we only remove wrapper
elements from complex types if they're NOT arrays (in the array case, we need a wrapper
element to distinguish one array of N elements from N parameters).
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?view=diff&rev=512531&r1=512530&r2=512531
==============================================================================
--- 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 Tue Feb 27 16:50:26 2007
@@ -171,7 +171,6 @@
SerializerRegistry registry = SerializerRegistry.getInstance();
Serializer ser = registry.getSerializer(theClass);
-
Element xml = ser.toXML(obj, qname);
//
@@ -210,7 +209,11 @@
//
Element child = XmlUtils.getFirstElement(xml);
- if (child != null)
+ //
+ // make sure we do NOT do this for arrays - in that case, we
+ // WANT the wrapper element (to act as an array enclosure)
+ //
+ if (child != null && !theClass.isArray())
fixComplexType(child);
return xml;
---------------------------------------------------------------------
To unsubscribe, e-mail: muse-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-commits-help@ws.apache.org