Author: dkulp Date: Thu Sep 11 18:23:20 2008 New Revision: 694574 URL: http://svn.apache.org/viewvc?rev=694574&view=rev Log: Merged revisions 694467 via svnmerge from https://svn.apache.org/repos/asf/cxf/branches/2.1.x-fixes
................ r694467 | dkulp | 2008-09-11 16:43:50 -0400 (Thu, 11 Sep 2008) | 9 lines Merged revisions 693819 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r693819 | seanoc | 2008-09-10 08:44:01 -0400 (Wed, 10 Sep 2008) | 1 line Modified code to remove use of NodeList ........ ................ Modified: cxf/branches/2.0.x-fixes/ (props changed) cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractFactoryBeanDefinitionParser.java cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.java cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java cxf/branches/2.0.x-fixes/integration/jbi/src/main/java/org/apache/cxf/jbi/se/CXFServiceUnit.java cxf/branches/2.0.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java cxf/branches/2.0.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/interceptor/URIParameterOutInterceptor.java cxf/branches/2.0.x-fixes/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIFaultOutInterceptor.java cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultOutInterceptor.java cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultOutInterceptor.java cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/ToolSpec.java Propchange: cxf/branches/2.0.x-fixes/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Sep 11 18:23:20 2008 @@ -1,3 +1,3 @@ -/cxf/branches/2.1.x-fixes:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653,677048,677385,678004,678009,678559,678629,678808,678852,678891,678893,679248,679597,680435,681060,681165,681813,681816,682902,682951,683089,683290,683318,684099,684790-684793,684842,684862,684895-684918,685205,685253,686237,686283,686299,686333-686364,686765,686827,687097,687464-687465,689109,689112,689122,691316,691357,691491,691711,691715,691745,692162-692163,692468,692500,694466 -/cxf/trunk:651669-686342,686344-686363,686764,686820,687096,687387,687463,688086,688102,688735,691271,691355,691488,691602,691706,691728,692116,692157,692466,692499,693653 +/cxf/branches/2.1.x-fixes:673548,674485,674547,674551,674562,674601,674649,674764,674887,675644,675653,677048,677385,678004,678009,678559,678629,678808,678852,678891,678893,679248,679597,680435,681060,681165,681813,681816,682902,682951,683089,683290,683318,684099,684790-684793,684842,684862,684895-684918,685205,685253,686237,686283,686299,686333-686364,686765,686827,687097,687464-687465,689109,689112,689122,691316,691357,691491,691711,691715,691745,692162-692163,692468,692500,694466-694467 +/cxf/trunk:651669-686342,686344-686363,686764,686820,687096,687387,687463,688086,688102,688735,691271,691355,691488,691602,691706,691728,692116,692157,692466,692499,693653,693819 /incubator/cxf/trunk:434594-651668 Propchange: cxf/branches/2.0.x-fixes/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Thu Sep 11 18:23:20 2008 @@ -1 +1 @@ -/cxf/branches/2.1.x-fixes:1-686313,686315-686332,686334-686346,686348-686828,687097,687464-687465,689109,689112,689122,690841,691316,691357,691491,691711,691715,691745,692162-692163,692344,692468,692500,694466 +/cxf/branches/2.1.x-fixes:1-686313,686315-686332,686334-686346,686348-686828,687097,687464-687465,689109,689112,689122,690841,691316,691357,691491,691711,691715,691745,692162-692163,692344,692468,692500,694466-694467 Modified: cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java?rev=694574&r1=694573&r2=694574&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java (original) +++ cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractBeanDefinitionParser.java Thu Sep 11 18:23:20 2008 @@ -34,7 +34,6 @@ import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; -import org.w3c.dom.NodeList; import org.apache.cxf.common.logging.LogUtils; import org.apache.cxf.common.util.CacheMap; @@ -110,14 +109,11 @@ } protected void parseChildElements(Element element, ParserContext ctx, BeanDefinitionBuilder bean) { - NodeList children = element.getChildNodes(); - for (int i = 0; i < children.getLength(); i++) { - Node n = children.item(i); - if (n.getNodeType() == Node.ELEMENT_NODE) { - String name = n.getLocalName(); - - mapElement(ctx, bean, (Element) n, name); - } + Element el = DOMUtils.getFirstElement(element); + while (el != null) { + String name = el.getLocalName(); + mapElement(ctx, bean, el, name); + el = DOMUtils.getNextElement(el); } } @@ -209,15 +205,7 @@ } protected Element getFirstChild(Element element) { - Element first = null; - NodeList children = element.getChildNodes(); - for (int i = 0; i < children.getLength(); i++) { - Node n = children.item(i); - if (n.getNodeType() == Node.ELEMENT_NODE) { - first = (Element) n; - } - } - return first; + return DOMUtils.getFirstElement(element); } protected void addBusWiringAttribute(BeanDefinitionBuilder bean, BusWiringType type) { @@ -238,14 +226,15 @@ String propertyName, Class<?> c) { Element data = null; - NodeList nl = parent.getChildNodes(); - for (int i = 0; i < nl.getLength(); i++) { - Node n = nl.item(i); - if (n.getNodeType() == Node.ELEMENT_NODE && name.getLocalPart().equals(n.getLocalName()) - && name.getNamespaceURI().equals(n.getNamespaceURI())) { - data = (Element)n; + + Node node = parent.getFirstChild(); + while (node != null) { + if (node.getNodeType() == Node.ELEMENT_NODE && name.getLocalPart().equals(node.getLocalName()) + && name.getNamespaceURI().equals(node.getNamespaceURI())) { + data = (Element)node; break; } + node = node.getNextSibling(); } if (data == null) { Modified: cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractFactoryBeanDefinitionParser.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractFactoryBeanDefinitionParser.java?rev=694574&r1=694573&r2=694574&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractFactoryBeanDefinitionParser.java (original) +++ cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/configuration/spring/AbstractFactoryBeanDefinitionParser.java Thu Sep 11 18:23:20 2008 @@ -23,7 +23,6 @@ import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; -import org.w3c.dom.NodeList; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.xml.ParserContext; @@ -66,14 +65,13 @@ addBusWiringAttribute(factoryBean, BusWiringType.PROPERTY); } - NodeList children = element.getChildNodes(); - for (int i = 0; i < children.getLength(); i++) { - Node n = children.item(i); - if (n.getNodeType() == Node.ELEMENT_NODE) { - String name = n.getLocalName(); - - mapElement(ctx, factoryBean, (Element) n, name); + Node node = element.getFirstChild(); + while (node != null) { + if (node.getNodeType() == Node.ELEMENT_NODE) { + String name = node.getLocalName(); + mapElement(ctx, factoryBean, (Element) node, name); } + node = node.getNextSibling(); } String id = getIdOrName(element); Modified: cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.java?rev=694574&r1=694573&r2=694574&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.java (original) +++ cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/XMLUtils.java Thu Sep 11 18:23:20 2008 @@ -316,11 +316,11 @@ return createTextNode(node.getOwnerDocument(), data); } - public static void removeContents(Node node) { - NodeList list = node.getChildNodes(); - for (int i = 0; i < list.getLength(); i++) { - Node entry = list.item(i); - node.removeChild(entry); + public static void removeContents(Node parent) { + Node node = parent.getFirstChild(); + while (node != null) { + parent.removeChild(node); + node = node.getNextSibling(); } } Modified: cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=694574&r1=694573&r2=694574&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original) +++ cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Thu Sep 11 18:23:20 2008 @@ -57,7 +57,6 @@ import org.w3c.dom.EntityReference; import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; -import org.w3c.dom.NodeList; import org.w3c.dom.ProcessingInstruction; import org.w3c.dom.Text; @@ -437,16 +436,15 @@ if (writeProlog) { writer.writeStartDocument(); } - - NodeList rootChildren = d.getChildNodes(); - for (int rcx = 0; rcx < rootChildren.getLength(); rcx++) { - Node rootChild = rootChildren.item(rcx); - // don't write PIs if we're not writing a prolog. - if (writeProlog || rootChild.getNodeType() == Node.ELEMENT_NODE) { - writeNode(rootChild, writer, repairing); + + Node node = d.getFirstChild(); + while (node != null) { + if (writeProlog || node.getNodeType() == Node.ELEMENT_NODE) { + writeNode(node, writer, repairing); } + node = node.getNextSibling(); } - + if (writeProlog) { writer.writeEndDocument(); } Modified: cxf/branches/2.0.x-fixes/integration/jbi/src/main/java/org/apache/cxf/jbi/se/CXFServiceUnit.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/integration/jbi/src/main/java/org/apache/cxf/jbi/se/CXFServiceUnit.java?rev=694574&r1=694573&r2=694574&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/integration/jbi/src/main/java/org/apache/cxf/jbi/se/CXFServiceUnit.java (original) +++ cxf/branches/2.0.x-fixes/integration/jbi/src/main/java/org/apache/cxf/jbi/se/CXFServiceUnit.java Thu Sep 11 18:23:20 2008 @@ -39,8 +39,6 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; -import org.w3c.dom.NodeList; - import org.apache.cxf.Bus; import org.apache.cxf.BusException; @@ -280,14 +278,15 @@ return root; } - NodeList children = root.getChildNodes(); - for (int i = 0; i < children.getLength(); i++) { - Node child = children.item(i); - Node found = findNode(child, name); - if (found != null) { + Node node = root.getFirstChild(); + + while (node != null) { + Node found = findNode(node, name); + if (found != null) { return found; - } - } + } + node = node.getNextSibling(); + } return null; } Modified: cxf/branches/2.0.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java?rev=694574&r1=694573&r2=694574&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java (original) +++ cxf/branches/2.0.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java Thu Sep 11 18:23:20 2008 @@ -32,7 +32,6 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; -import org.w3c.dom.NodeList; import org.apache.cxf.common.i18n.BundleUtils; import org.apache.cxf.common.i18n.Message; @@ -332,10 +331,10 @@ root.appendChild(ec); } } else { - NodeList childNodes = ec.getChildNodes(); - for (int j = 0; j < childNodes.getLength(); j++) { - Node n = childNodes.item(j); - ec.removeChild(n); + Node node = ec.getFirstChild(); + while (node != null) { + ec.removeChild(node); + node = node.getNextSibling(); } } @@ -348,29 +347,26 @@ } private static Element getIndexedElement(Element e, int i) { - NodeList childNodes = e.getChildNodes(); + Element elem = DOMUtils.getFirstElement(e); int elNum = 0; - for (int j = 0; j < childNodes.getLength(); j++) { - Node n = childNodes.item(j); - if (n.getNodeType() == Node.ELEMENT_NODE) { - if (i == elNum) { - return (Element) n; - } - elNum++; + while (elem != null) { + if (i == elNum) { + return elem; } + elNum++; + elem = DOMUtils.getNextElement(elem); } return null; } private static Element getElement(Element element, QName name) { - NodeList childNodes = element.getChildNodes(); - for (int j = 0; j < childNodes.getLength(); j++) { - Node n = childNodes.item(j); - if (n.getNodeType() == Node.ELEMENT_NODE - && n.getLocalName().equals(name.getLocalPart()) - && n.getNamespaceURI().equals(name.getNamespaceURI())) { - return (Element)n; + Element elem = DOMUtils.getFirstElement(element); + while (elem != null) { + if (elem.getLocalName().equals(name.getLocalPart()) + && elem.getNamespaceURI().equals(name.getNamespaceURI())) { + return elem; } + elem = DOMUtils.getNextElement(elem); } return null; } Modified: cxf/branches/2.0.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/interceptor/URIParameterOutInterceptor.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/interceptor/URIParameterOutInterceptor.java?rev=694574&r1=694573&r2=694574&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/interceptor/URIParameterOutInterceptor.java (original) +++ cxf/branches/2.0.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/interceptor/URIParameterOutInterceptor.java Thu Sep 11 18:23:20 2008 @@ -21,7 +21,6 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; -import org.w3c.dom.NodeList; import org.apache.cxf.binding.http.URIMapper; import org.apache.cxf.endpoint.Endpoint; @@ -89,15 +88,14 @@ int locEnd = locPath.indexOf('}', idx1); String name = locPath.substring(idx1 + 1, locEnd); idx1 = locEnd; - - NodeList childNodes = root.getChildNodes(); - for (int i = 0; i < childNodes.getLength(); i++) { - Node n = childNodes.item(i); - - if (n.getNodeType() == Node.ELEMENT_NODE && name.equals(n.getLocalName())) { - builder.append(DOMUtils.getContent(n)); + + Node node = root.getFirstChild(); + while (node != null) { + if (node.getNodeType() == Node.ELEMENT_NODE && name.equals(node.getLocalName())) { + builder.append(DOMUtils.getContent(node)); break; - } + } + node = node.getNextSibling(); } start = locEnd + 1; Modified: cxf/branches/2.0.x-fixes/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIFaultOutInterceptor.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIFaultOutInterceptor.java?rev=694574&r1=694573&r2=694574&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIFaultOutInterceptor.java (original) +++ cxf/branches/2.0.x-fixes/rt/bindings/jbi/src/main/java/org/apache/cxf/binding/jbi/interceptor/JBIFaultOutInterceptor.java Thu Sep 11 18:23:20 2008 @@ -24,13 +24,13 @@ import javax.xml.stream.XMLStreamWriter; import org.w3c.dom.Element; -import org.w3c.dom.NodeList; import org.apache.cxf.binding.jbi.JBIConstants; import org.apache.cxf.binding.jbi.JBIFault; import org.apache.cxf.binding.jbi.JBIMessage; import org.apache.cxf.common.i18n.BundleUtils; import org.apache.cxf.common.i18n.Message; +import org.apache.cxf.helpers.DOMUtils; import org.apache.cxf.helpers.NSStack; import org.apache.cxf.interceptor.Fault; import org.apache.cxf.phase.AbstractPhaseInterceptor; @@ -64,13 +64,10 @@ writer.writeEmptyElement("fault"); } else { Element detail = jbiFault.getDetail(); - NodeList details = detail.getChildNodes(); - for (int i = 0; i < details.getLength(); i++) { - if (details.item(i) instanceof Element) { - StaxUtils.writeNode(details.item(i), writer, true); - break; - } - } + Element elem = DOMUtils.getFirstElement(detail); + if (elem != null) { + StaxUtils.writeNode(elem, writer, true); + } } writer.writeEndElement(); writer.flush(); Modified: cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultOutInterceptor.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultOutInterceptor.java?rev=694574&r1=694573&r2=694574&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultOutInterceptor.java (original) +++ cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap11FaultOutInterceptor.java Thu Sep 11 18:23:20 2008 @@ -29,7 +29,7 @@ import org.w3c.dom.Document; import org.w3c.dom.Element; -import org.w3c.dom.NodeList; +import org.w3c.dom.Node; import org.apache.cxf.binding.soap.Soap11; import org.apache.cxf.binding.soap.SoapFault; @@ -118,10 +118,11 @@ if (fault.hasDetails()) { Element detail = fault.getDetail(); writer.writeStartElement("detail"); - - NodeList details = detail.getChildNodes(); - for (int i = 0; i < details.getLength(); i++) { - StaxUtils.writeNode(details.item(i), writer, true); + + Node node = detail.getFirstChild(); + while (node != null) { + StaxUtils.writeNode(node, writer, true); + node = node.getNextSibling(); } // Details Modified: cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultOutInterceptor.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultOutInterceptor.java?rev=694574&r1=694573&r2=694574&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultOutInterceptor.java (original) +++ cxf/branches/2.0.x-fixes/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultOutInterceptor.java Thu Sep 11 18:23:20 2008 @@ -26,7 +26,7 @@ import javax.xml.stream.XMLStreamWriter; import org.w3c.dom.Element; -import org.w3c.dom.NodeList; +import org.w3c.dom.Node; import org.apache.cxf.binding.soap.SoapFault; import org.apache.cxf.binding.soap.SoapMessage; @@ -95,9 +95,10 @@ Element detail = fault.getDetail(); writer.writeStartElement(defaultPrefix, "Detail", ns); - NodeList details = detail.getChildNodes(); - for (int i = 0; i < details.getLength(); i++) { - StaxUtils.writeNode(details.item(i), writer, true); + Node node = detail.getFirstChild(); + while (node != null) { + StaxUtils.writeNode(node, writer, true); + node = node.getNextSibling(); } // Details Modified: cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java?rev=694574&r1=694573&r2=694574&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java (original) +++ cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/spring/EndpointDefinitionParser.java Thu Sep 11 18:23:20 2008 @@ -26,8 +26,6 @@ import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; import org.apache.cxf.Bus; import org.apache.cxf.BusFactory; @@ -36,6 +34,7 @@ import org.apache.cxf.common.util.StringUtils; import org.apache.cxf.configuration.spring.AbstractBeanDefinitionParser; import org.apache.cxf.configuration.spring.BusWiringType; +import org.apache.cxf.helpers.DOMUtils; import org.apache.cxf.jaxws.EndpointImpl; import org.springframework.beans.BeansException; import org.springframework.beans.FatalBeanException; @@ -97,29 +96,27 @@ } } - NodeList children = element.getChildNodes(); - for (int i = 0; i < children.getLength(); i++) { - Node n = children.item(i); - if (n.getNodeType() == Node.ELEMENT_NODE) { - String name = n.getLocalName(); - if ("properties".equals(name)) { - Map map = ctx.getDelegate().parseMapElement((Element) n, bean.getBeanDefinition()); - bean.addPropertyValue("properties", map); - } else if ("binding".equals(name)) { - setFirstChildAsProperty((Element) n, ctx, bean, "bindingConfig"); - } else if ("inInterceptors".equals(name) || "inFaultInterceptors".equals(name) - || "outInterceptors".equals(name) || "outFaultInterceptors".equals(name) - || "features".equals(name) || "schemaLocations".equals(name) - || "handlers".equals(name)) { - List list = ctx.getDelegate().parseListElement((Element) n, bean.getBeanDefinition()); - bean.addPropertyValue(name, list); - } else if (IMPLEMENTOR.equals(name)) { - ctx.getDelegate() - .parseConstructorArgElement((Element)n, bean.getBeanDefinition()); - } else { - setFirstChildAsProperty((Element) n, ctx, bean, name); - } + Element elem = DOMUtils.getFirstElement(element); + while (elem != null) { + String name = elem.getLocalName(); + if ("properties".equals(name)) { + Map map = ctx.getDelegate().parseMapElement(elem, bean.getBeanDefinition()); + bean.addPropertyValue("properties", map); + } else if ("binding".equals(name)) { + setFirstChildAsProperty(elem, ctx, bean, "bindingConfig"); + } else if ("inInterceptors".equals(name) || "inFaultInterceptors".equals(name) + || "outInterceptors".equals(name) || "outFaultInterceptors".equals(name) + || "features".equals(name) || "schemaLocations".equals(name) + || "handlers".equals(name)) { + List list = ctx.getDelegate().parseListElement(elem, bean.getBeanDefinition()); + bean.addPropertyValue(name, list); + } else if (IMPLEMENTOR.equals(name)) { + ctx.getDelegate() + .parseConstructorArgElement(elem, bean.getBeanDefinition()); + } else { + setFirstChildAsProperty(elem, ctx, bean, name); } + elem = DOMUtils.getNextElement(elem); } if (!isAbstract) { bean.setInitMethodName("publish"); Modified: cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java?rev=694574&r1=694573&r2=694574&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java (original) +++ cxf/branches/2.0.x-fixes/rt/frontend/simple/src/main/java/org/apache/cxf/service/factory/ReflectionServiceFactoryBean.java Thu Sep 11 18:23:20 2008 @@ -278,7 +278,9 @@ } protected void buildServiceFromWSDL(String url) { - LOG.info("Creating Service " + getServiceQName() + " from WSDL: " + url); + if (LOG.isLoggable(Level.FINE)) { + LOG.fine("Creating Service " + getServiceQName() + " from WSDL: " + url); + } populateFromClass = false; WSDLServiceFactory factory = new WSDLServiceFactory(getBus(), url, getServiceQName()); setService(factory.create()); @@ -299,7 +301,9 @@ } protected void buildServiceFromClass() { - LOG.info("Creating Service " + getServiceQName() + " from class " + getServiceClass().getName()); + if (LOG.isLoggable(Level.FINE)) { + LOG.fine("Creating Service " + getServiceQName() + " from class " + getServiceClass().getName()); + } populateFromClass = true; if (Proxy.isProxyClass(this.getServiceClass())) { Modified: cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/ToolSpec.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/ToolSpec.java?rev=694574&r1=694573&r2=694574&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/ToolSpec.java (original) +++ cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/ToolSpec.java Thu Sep 11 18:23:20 2008 @@ -279,14 +279,15 @@ public String getAnnotation() { String result = null; Element element = doc.getDocumentElement(); - NodeList list = element.getChildNodes(); - - for (int i = 0; i < list.getLength(); i++) { - if ((list.item(i).getNodeType() == Node.ELEMENT_NODE) - && ("annotation".equals(list.item(i).getNodeName()))) { - result = list.item(i).getFirstChild().getNodeValue(); + + Node node = element.getFirstChild(); + while (node != null) { + if ((node.getNodeType() == Node.ELEMENT_NODE) + && ("annotation".equals(node.getNodeName()))) { + result = node.getNodeValue(); break; } + node = node.getNextSibling(); } return result; }
