This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit eacfeb5e78e02ea834a598561a51260ab24a3f10
Author: Andreas Veithen <veit...@apache.org>
AuthorDate: Sat Oct 1 22:56:53 2011 +0000

    RAMPART-336: Merged r1177413 to the 1.5 branch and updated the dependencies.
---
 .../src/main/java/org/apache/rampart/util/Axis2Util.java  | 15 ++++-----------
 pom.xml                                                   |  4 ++--
 2 files changed, 6 insertions(+), 13 deletions(-)

diff --git 
a/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java 
b/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
index 7874475..2de1406 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
@@ -194,10 +194,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()) {
@@ -210,17 +206,14 @@ public class Axis2Util {
                                        header.declareNamespace(ns);
                                }
                                Iterator children = element.getChildElements();
-
-                            // 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();
diff --git a/pom.xml b/pom.xml
index 169142c..295044d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -382,8 +382,8 @@
     </modules>
 
     <properties>
-        <axis2.version>1.5.6</axis2.version>
-        <axiom.version>1.2.12</axiom.version>
+        <axis2.version>1.5.7-SNAPSHOT</axis2.version>
+        <axiom.version>1.2.13-SNAPSHOT</axiom.version>
 
         <wss4j.version>1.5.12</wss4j.version>
         <opensaml.version>1.1</opensaml.version>

Reply via email to