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 ve...@apache.org on 2011/09/29 21:56:00 UTC

svn commit: r1177413 - /axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java

Author: veithen
Date: Thu Sep 29 19:55:59 2011
New Revision: 1177413

URL: http://svn.apache.org/viewvc?rev=1177413&view=rev
Log:
Reverted r1177260 because that change actually depends on a bug in DOOM that is now fixed (see r1177407). With that change in Axiom, the problem described in RAMPART-336 no longer occurs.

Modified:
    axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java

Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java?rev=1177413&r1=1177412&r2=1177413&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java Thu Sep 29 19:55:59 2011
@@ -217,10 +217,6 @@ public class Axis2Util {
                         // it is a header we have added in rampart eg. EncryptedHeader and should
                         // be converted to SOAPHeaderBlock for processing
                     	} else {
-                            // First detach element from soap header
-                            element.detach();
-
-                            // add new element
                     		header = soapHeader.addHeaderBlock(element.getLocalName(), element.getNamespace());
                     		Iterator attrIter = element.getAllAttributes();
                     		while (attrIter.hasNext()) {
@@ -235,17 +231,14 @@ public class Axis2Util {
                     		// retrieve all child nodes (including any text nodes)
                     		// and re-attach to header block
                     		Iterator children = element.getChildren();
-
-                            // Element is a composite element, in which it has many siblings.
-                            // All siblings will be added when we add a single node.
-                            // See ParentNode.insertBefore(Node newChild, Node refChild) for
-                            // more information.
-                    		if (children.hasNext()) {
+                    		while (children.hasNext()) {
                     			OMNode child = (OMNode)children.next();
                     			children.remove();
                     			header.addChild(child);
                     		}
-
+                    		
+                    		element.detach();
+                    		
                     		soapHeader.build();
                     		
                     		header.setProcessed();