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 2018/10/23 16:13:15 UTC

svn commit: r1844668 - /axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/handler/soapheadersadapter/SOAPHeadersAdapterTests.java

Author: veithen
Date: Tue Oct 23 16:13:15 2018
New Revision: 1844668

URL: http://svn.apache.org/viewvc?rev=1844668&view=rev
Log:
Fix test that makes incorrect assumptions about the return type of SAAJ's getChildElements method.

Modified:
    axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/handler/soapheadersadapter/SOAPHeadersAdapterTests.java

Modified: axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/handler/soapheadersadapter/SOAPHeadersAdapterTests.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/handler/soapheadersadapter/SOAPHeadersAdapterTests.java?rev=1844668&r1=1844667&r2=1844668&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/handler/soapheadersadapter/SOAPHeadersAdapterTests.java (original)
+++ axis/axis2/java/core/trunk/modules/jaxws/test/org/apache/axis2/jaxws/handler/soapheadersadapter/SOAPHeadersAdapterTests.java Tue Oct 23 16:13:15 2018
@@ -28,6 +28,7 @@ import java.util.Map;
 import java.util.Set;
 
 import javax.xml.namespace.QName;
+import javax.xml.soap.Node;
 import javax.xml.soap.SOAPElement;
 import javax.xml.soap.SOAPEnvelope;
 import javax.xml.soap.SOAPFactory;
@@ -643,11 +644,11 @@ public class SOAPHeadersAdapterTests ext
         
         // confirm headers are there
         SOAPHeader soapHeader = soapMessage.getSOAPHeader();
-        Iterator<SOAPHeaderElement> it = soapHeader.getChildElements();
+        Iterator<Node> it = soapHeader.getChildElements();
         // TODO: not sure if the order of the header additions is or should be preserved.
         // in other words, this test may be a little too strict.
-        SOAPHeaderElement headerElem1 = it.next();
-        SOAPHeaderElement headerElem2 = it.next();
+        SOAPHeaderElement headerElem1 = (SOAPHeaderElement)it.next();
+        SOAPHeaderElement headerElem2 = (SOAPHeaderElement)it.next();
         // should only be two header elements, so...
         assertFalse(it.hasNext());
         
@@ -703,11 +704,11 @@ public class SOAPHeadersAdapterTests ext
         
         // confirm headers are there
         SOAPHeader soapHeader = soapEnvelope.getHeader();
-        Iterator<SOAPHeaderElement> it = soapHeader.getChildElements();
+        Iterator<Node> it = soapHeader.getChildElements();
         // TODO: not sure if the order of the header additions is or should be preserved.
         // in other words, this test may be a little too strict.
-        SOAPHeaderElement headerElem1 = it.next();
-        SOAPHeaderElement headerElem2 = it.next();
+        SOAPHeaderElement headerElem1 = (SOAPHeaderElement)it.next();
+        SOAPHeaderElement headerElem2 = (SOAPHeaderElement)it.next();
         // should only be two header elements, so...
         assertFalse(it.hasNext());