axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ruchi...@apache.org
Subject svn commit: r240242 - /webservices/axis/trunk/java/modules/xml/src/org/apache/axis2/soap/impl/llom/SOAPHeaderImpl.java
Date Fri, 26 Aug 2005 13:31:00 GMT
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



Mime
View raw message