[jboss-svn-commits] JBL Code SVN: r33707 - labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mw/wst11/common.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Jun 30 11:27:47 EDT 2010


Author: adinn
Date: 2010-06-30 11:27:47 -0400 (Wed, 30 Jun 2010)
New Revision: 33707

Modified:
   labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mw/wst11/common/CoordinationContextHelper.java
Log:
corrected problem with serialization of coordination context element which arises because Native hans out copies of SOAP Node lists form a SOAP message whereas CXF hands out the actual list in the SOAP message -- fix for JBTM-755

Modified: labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mw/wst11/common/CoordinationContextHelper.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mw/wst11/common/CoordinationContextHelper.java	2010-06-30 14:56:04 UTC (rev 33706)
+++ labs/jbosstm/trunk/XTS/WSTX/classes11/com/arjuna/mw/wst11/common/CoordinationContextHelper.java	2010-06-30 15:27:47 UTC (rev 33707)
@@ -91,8 +91,15 @@
             // copy the children
             NodeList children = element.getChildNodes();
             l = children.getLength();
+            Node[] copy = new Node[l];
+            // sigh. native creates a copy list while CXF gives us the actual child list so there is no simple way
+            // to index into it from 0 to l which will work with both stacks. instead we copy the entries to an array
+            // and use it to locate the element we want to delete and the append to the parent.
             for (int i = 0; i < l; i++) {
-                Node child = children.item(i);
+                copy[i] = children.item(i);
+            }
+            for (int i = 0; i < l; i++) {
+                Node child = copy[i];
                 element.removeChild(child);
                 headerElement.appendChild(child);
             }



More information about the jboss-svn-commits mailing list