cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sea...@apache.org
Subject svn commit: r727754 - in /cxf/trunk: rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/ rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/ rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/ tools/common/src/main/java/org/apache/cxf/t...
Date Thu, 18 Dec 2008 15:53:21 GMT
Author: seanoc
Date: Thu Dec 18 07:53:20 2008
New Revision: 727754

URL: http://svn.apache.org/viewvc?rev=727754&view=rev
Log:
NodeList references removed

Modified:
    cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
    cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java
    cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptor.java
    cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/SoapFaultFactory.java
    cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/Form.java

Modified: cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java?rev=727754&r1=727753&r2=727754&view=diff
==============================================================================
--- cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
(original)
+++ cxf/trunk/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/JAXBEncoderDecoderTest.java
Thu Dec 18 07:53:20 2008
@@ -288,7 +288,6 @@
         JAXBEncoderDecoder.marshall(context.createMarshaller(), 
                                     new String("TestSOAPMessage"), part,  elNode);
         
-        assertNotNull(elNode.getChildNodes());
         assertEquals("TestSOAPMessage", elNode.getFirstChild().getFirstChild().getNodeValue());
     }
 

Modified: cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java?rev=727754&r1=727753&r2=727754&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java
(original)
+++ cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java
Thu Dec 18 07:53:20 2008
@@ -197,7 +197,7 @@
                         // change mustUnderstand to false
                         SOAPMessage message = smc.getMessage();
                         SOAPHeader soapHeader = message.getSOAPHeader();
-                        Element headerElementNew = (Element)soapHeader.getChildNodes().item(0);
+                        Element headerElementNew = (Element)soapHeader.getFirstChild();
 
                         SoapVersion soapVersion = Soap11.getInstance();                 
      
                         Attr attr = 
@@ -240,7 +240,7 @@
         
         message.setContent(Node.class, headerInfo[0]);
         
-        Node node = ((Element) headerInfo[1]).getChildNodes().item(0);
+        Node node = ((Element) headerInfo[1]).getFirstChild();
         
         message.getHeaders().add(new Header(new QName(node.getNamespaceURI(), node.getLocalName()),
node));
         

Modified: cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptor.java?rev=727754&r1=727753&r2=727754&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptor.java (original)
+++ cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/RMSoapInterceptor.java Thu
Dec 18 07:53:20 2008
@@ -219,11 +219,13 @@
                                    marshaller);
                 }
             }
-            for (int i = 0; i < hdr.getChildNodes().getLength(); i++) {
-                Node node = hdr.getChildNodes().item(i);
+            Node node = hdr.getFirstChild();
+            while (node != null) {
                 Header holder = new Header(new QName(node.getNamespaceURI(), node.getLocalName()),
node);
                 header.add(holder);
+                node = node.getNextSibling();
             }
+
         } catch (SOAPException se) {
             LOG.log(Level.WARNING, "SOAP_HEADER_ENCODE_FAILURE_MSG", se); 
         } catch (JAXBException je) {

Modified: cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/SoapFaultFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/SoapFaultFactory.java?rev=727754&r1=727753&r2=727754&view=diff
==============================================================================
--- cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/SoapFaultFactory.java (original)
+++ cxf/trunk/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/soap/SoapFaultFactory.java Thu Dec
18 07:53:20 2008
@@ -114,7 +114,8 @@
             Identifier id = (Identifier)detail;  
             m.marshal(id, doc);            
         }
-        elem = (Element)doc.getChildNodes().item(0);
+        
+        elem =  (Element)doc.getFirstChild();
         fault.setDetail(elem);
     }
     

Modified: cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/Form.java
URL: http://svn.apache.org/viewvc/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/Form.java?rev=727754&r1=727753&r2=727754&view=diff
==============================================================================
--- cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/Form.java
(original)
+++ cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/Form.java
Thu Dec 18 07:53:20 2008
@@ -25,6 +25,7 @@
 import java.util.logging.Logger;
 
 import org.w3c.dom.Element;
+import org.w3c.dom.Node;
 import org.w3c.dom.NodeList;
 
 import org.apache.cxf.common.logging.LogUtils;
@@ -55,12 +56,13 @@
     }
 
     private void getOptions(Element el) {
-        NodeList children = el.getChildNodes();
-
-        for (int i = 0; i < children.getLength(); i++) {
-            if ("option".equals(children.item(i).getNodeName())) {
-                options.add(new Option((Element)children.item(i)));
+        
+        Node node = el.getFirstChild();
+        while (node != null) {
+            if ("option".equals(node.getNodeName())) {
+                options.add(new Option((Element)node));
             }
+            node = node.getNextSibling();
         }
     }
 



Mime
View raw message