You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ru...@apache.org on 2005/08/26 15:31:00 UTC

svn commit: r240242 - /webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPHeaderImpl.java

Author: ruchithf
Date: Fri Aug 26 06:30:55 2005
New Revision: 240242

URL: http://svn.apache.org/viewcvs?rev=240242&view=rev
Log:
Changed SOAPHeaderImpl.java to return all SOAP headers when the actor is null - thanks to Chinthaka :-) 

Modified:
    webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPHeaderImpl.java

Modified: webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPHeaderImpl.java
URL: http://svn.apache.org/viewcvs/webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPHeaderImpl.java?rev=240242&r1=240241&r2=240242&view=diff
==============================================================================
--- webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPHeaderImpl.java (original)
+++ webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPHeaderImpl.java Fri Aug 26 06:30:55 2005
@@ -78,8 +78,14 @@
      * @see #extractHeaderBlocks(String) extractHeaderBlocks(java.lang.String)
      */
     public Iterator examineHeaderBlocks(String paramRole) {
+//    	
         Iterator headerBlocksIter = this.getChildren();
         ArrayList headersWithGivenActor = new ArrayList();
+        
+        if(paramRole == null || "".equals(paramRole)){
+    		return returnAllSOAPHeaders(this.getChildren());
+    	}
+        
         while (headerBlocksIter.hasNext()) {
             Object o = headerBlocksIter.next();
             if (o instanceof SOAPHeaderBlock) {
@@ -93,7 +99,20 @@
         return headersWithGivenActor.iterator();
     }
 
-    /**
+    private Iterator returnAllSOAPHeaders(Iterator children) {
+    	ArrayList headers = new ArrayList();
+    	while (children.hasNext()) {
+            Object o = children.next();
+            if (o instanceof SOAPHeaderBlock) {
+                headers.add(o);
+            }
+        }
+    	
+    	return headers.iterator();
+		
+	}
+
+	/**
      * Returns a list of all the <CODE>SOAPHeaderBlock</CODE> objects in this
      * <CODE>SOAPHeader</CODE> object that have the the specified role and
      * detaches them from this <CODE> SOAPHeader</CODE> object. <P>This method