Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 35634 invoked from network); 12 Sep 2008 01:37:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Sep 2008 01:37:57 -0000 Received: (qmail 35365 invoked by uid 500); 12 Sep 2008 01:37:54 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 35316 invoked by uid 500); 12 Sep 2008 01:37:53 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 35307 invoked by uid 99); 12 Sep 2008 01:37:53 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Sep 2008 18:37:53 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Sep 2008 01:37:03 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id EB139238898F; Thu, 11 Sep 2008 18:37:35 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r694578 - in /cxf/branches/2.0.x-fixes: ./ api/src/main/java/org/apache/cxf/service/model/ rt/core/src/main/java/org/apache/cxf/wsdl11/ rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/ tools/common/src/main/java/org/apache... Date: Fri, 12 Sep 2008 01:37:35 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080912013735.EB139238898F@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Thu Sep 11 18:37:34 2008 New Revision: 694578 URL: http://svn.apache.org/viewvc?rev=694578&view=rev Log: Merged revisions 694469 via svnmerge from https://svn.apache.org/repos/asf/cxf/branches/2.1.x-fixes ................ r694469 | dkulp | 2008-09-11 16:49:07 -0400 (Thu, 11 Sep 2008) | 9 lines Merged revisions 694263 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r694263 | seanoc | 2008-09-11 10:11:22 -0400 (Thu, 11 Sep 2008) | 1 line removed expensive setAttributeNS() calls ........ ................ Modified: cxf/branches/2.0.x-fixes/ (props changed) cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/service/model/SchemaInfo.java cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/CommandLineParser.java cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/util/JAXBUtils.java cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/Stax2DOM.java cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java Propchange: cxf/branches/2.0.x-fixes/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Thu Sep 11 18:37:34 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-694468 -/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,694179 +/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-694469 +/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,694179,694263 /incubator/cxf/trunk:434594-651668 Propchange: cxf/branches/2.0.x-fixes/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Thu Sep 11 18:37:34 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-694468 +/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-694469 Modified: cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/service/model/SchemaInfo.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/service/model/SchemaInfo.java?rev=694578&r1=694577&r2=694578&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/service/model/SchemaInfo.java (original) +++ cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/service/model/SchemaInfo.java Thu Sep 11 18:37:34 2008 @@ -21,6 +21,7 @@ import javax.xml.namespace.QName; +import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -93,9 +94,10 @@ if (e.getPrefix() == null && !WSDLConstants.NU_SCHEMA_XSD.equals(e.getAttributeNS(WSDLConstants.NU_XMLNS, WSDLConstants.NP_XMLNS))) { - e.setAttributeNS(WSDLConstants.NU_XMLNS, - WSDLConstants.NP_XMLNS, - WSDLConstants.NU_SCHEMA_XSD); + Attr attr = e.getOwnerDocument().createAttributeNS(WSDLConstants.NU_XMLNS, + WSDLConstants.NP_XMLNS); + attr.setValue(WSDLConstants.NU_SCHEMA_XSD); + e.setAttributeNodeNS(attr); } setElement(e); } Modified: cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java?rev=694578&r1=694577&r2=694578&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java (original) +++ cxf/branches/2.0.x-fixes/rt/core/src/main/java/org/apache/cxf/wsdl11/SchemaUtil.java Thu Sep 11 18:37:34 2008 @@ -33,6 +33,7 @@ import javax.wsdl.extensions.schema.Schema; import javax.wsdl.extensions.schema.SchemaImport; +import org.w3c.dom.Attr; import org.w3c.dom.Element; import org.apache.cxf.Bus; @@ -106,8 +107,12 @@ for (Object prefix : def.getNamespaces().keySet()) { String ns = (String)def.getNamespaces().get(prefix); if (!"".equals(prefix) && !schemaElem.hasAttribute("xmlns:" + prefix)) { - schemaElem.setAttributeNS(javax.xml.XMLConstants.XMLNS_ATTRIBUTE_NS_URI, - "xmlns:" + prefix, ns); + String namespace = javax.xml.XMLConstants.XMLNS_ATTRIBUTE_NS_URI; + Attr attr = + schemaElem.getOwnerDocument().createAttributeNS(namespace, + "xmlns:" + prefix); + attr.setValue(ns); + schemaElem.setAttributeNodeNS(attr); } } String systemId = def.getDocumentBaseURI() + "#types" + schemaCount; Modified: cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java?rev=694578&r1=694577&r2=694578&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java (original) +++ cxf/branches/2.0.x-fixes/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/soap/SOAPHandlerInterceptorTest.java Thu Sep 11 18:37:34 2008 @@ -48,6 +48,7 @@ import javax.xml.ws.handler.soap.SOAPHandler; import javax.xml.ws.handler.soap.SOAPMessageContext; +import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -199,9 +200,12 @@ SOAPHeader soapHeader = message.getSOAPHeader(); Element headerElementNew = (Element)soapHeader.getChildNodes().item(0); - SoapVersion soapVersion = Soap11.getInstance(); - headerElementNew.setAttributeNS(soapVersion.getNamespace(), - "SOAP-ENV:mustUnderstand", "false"); + SoapVersion soapVersion = Soap11.getInstance(); + Attr attr = + headerElementNew.getOwnerDocument().createAttributeNS(soapVersion.getNamespace(), + "SOAP-ENV:mustUnderstand"); + attr.setValue("false"); + headerElementNew.setAttributeNodeNS(attr); } } catch (Exception e) { throw new Fault(e); @@ -296,8 +300,11 @@ SOAPHeaderElement headerElementNew = (SOAPHeaderElement)it.next(); SoapVersion soapVersion = Soap11.getInstance(); - headerElementNew.setAttributeNS(soapVersion.getNamespace(), - "SOAP-ENV:mustUnderstand", "false"); + Attr attr = + headerElementNew.getOwnerDocument().createAttributeNS(soapVersion.getNamespace(), + "SOAP-ENV:mustUnderstand"); + attr.setValue("false"); + headerElementNew.setAttributeNodeNS(attr); } } catch (Exception e) { throw new Fault(e); @@ -527,8 +534,12 @@ Element childElement = doc.createElementNS("http://apache.org/hello_world_rpclit/types", "ns2:header1"); + Attr attr = + childElement.getOwnerDocument().createAttributeNS(soapVersion.getNamespace(), + "SOAP-ENV:mustUnderstand"); + attr.setValue("true"); + childElement.setAttributeNodeNS(attr); - childElement.setAttributeNS(soapVersion.getNamespace(), "SOAP-ENV:mustUnderstand", "true"); headerElement.appendChild(childElement); envElement.appendChild(headerElement); envElement.appendChild(bodyElement); Modified: cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/CommandLineParser.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/CommandLineParser.java?rev=694578&r1=694577&r2=694578&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/CommandLineParser.java (original) +++ cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/common/toolspec/parser/CommandLineParser.java Thu Sep 11 18:37:34 2008 @@ -35,6 +35,7 @@ import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; +import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.NodeList; @@ -98,11 +99,12 @@ LOG.log(Level.SEVERE, "FAIL_CREATE_DOM_MSG"); } Element commandEl = resultDoc.createElementNS("http://cxf.apache.org/Xutil/Command", "command"); - - // resultDoc.createAttributeNS("http://www.w3.org/2001/XMLSchema-instance","schemaLocation"); - commandEl.setAttributeNS("http://www.w3.org/2001/XMLSchema-instance", "xsi:schemaLocation", - "http://cxf.apache.org/Xutil/Command http://cxf.apache.org/schema/xutil/c" - + "ommand.xsd"); + + Attr attr = + commandEl.getOwnerDocument().createAttributeNS("http://www.w3.org/2001/XMLSchema-instance", + "xsi:schemaLocation"); + attr.setValue("http://cxf.apache.org/Xutil/Command http://cxf.apache.org/schema/xutil/commnad.xsd"); + commandEl.setAttributeNodeNS(attr); commandEl.setAttribute("xmlns", "http://cxf.apache.org/Xutil/Command"); commandEl.setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance"); resultDoc.appendChild(commandEl); @@ -114,8 +116,7 @@ NodeList usageForms = toolspec.getUsageForms(); if (LOG.isLoggable(Level.FINE)) { - LOG - .fine("Found " + usageForms.getLength() + LOG.fine("Found " + usageForms.getLength() + " alternative forms of usage, will use default form"); } if (usageForms.getLength() > 0) { Modified: cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/util/JAXBUtils.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/util/JAXBUtils.java?rev=694578&r1=694577&r2=694578&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/util/JAXBUtils.java (original) +++ cxf/branches/2.0.x-fixes/tools/common/src/main/java/org/apache/cxf/tools/util/JAXBUtils.java Thu Sep 11 18:37:34 2008 @@ -22,6 +22,7 @@ import java.io.File; import java.io.FileOutputStream; +import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -31,6 +32,7 @@ import org.apache.cxf.helpers.FileUtils; import org.apache.cxf.helpers.XMLUtils; import org.apache.cxf.tools.common.ToolConstants; +//import org.apache.cxf.wsdl.WSDLConstants; public final class JAXBUtils { private JAXBUtils() { @@ -72,7 +74,10 @@ Document doc = schema.getOwnerDocument(); if (!XMLUtils.hasAttribute(schema, ToolConstants.NS_JAXB_BINDINGS)) { - schema.setAttributeNS(ToolConstants.NS_JAXB_BINDINGS, "version", "2.0"); + Attr attr = + schema.getOwnerDocument().createAttributeNS(ToolConstants.NS_JAXB_BINDINGS, "version"); + attr.setValue("2.0"); + schema.setAttributeNodeNS(attr); } Node schemaBindings = innerJaxbBinding(schema); Modified: cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/Stax2DOM.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/Stax2DOM.java?rev=694578&r1=694577&r2=694578&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/Stax2DOM.java (original) +++ cxf/branches/2.0.x-fixes/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/Stax2DOM.java Thu Sep 11 18:37:34 2008 @@ -36,6 +36,7 @@ import javax.xml.stream.events.StartElement; import javax.xml.stream.events.XMLEvent; +import org.w3c.dom.Attr; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; @@ -154,7 +155,9 @@ Namespace ns = (Namespace) ite.next(); String name = ns.getPrefix(); if (!StringUtils.isEmpty(name)) { - element.setAttributeNS(xmlns, name, ns.getNamespaceURI()); + Attr attr = element.getOwnerDocument().createAttributeNS(xmlns, name); + attr.setValue(ns.getNamespaceURI()); + element.setAttributeNodeNS(attr); } else { xmlns = ns.getNamespaceURI(); } Modified: cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java?rev=694578&r1=694577&r2=694578&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java (original) +++ cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customization/CustomizationParser.java Thu Sep 11 18:37:34 2008 @@ -284,10 +284,12 @@ NamedNodeMap atts = el.getAttributes(); for (int x = 0; x < atts.getLength(); x++) { Attr attr = (Attr)atts.item(x); - if (ToolConstants.NS_JAXB_BINDINGS.equals(attr.getNamespaceURI())) { - schemaNode.setAttributeNS(attr.getNamespaceURI(), - attr.getName(), - attr.getValue()); + if (ToolConstants.NS_JAXB_BINDINGS.equals(attr.getNamespaceURI())) { + Attr attrnew = schemaNode.getOwnerDocument().createAttributeNS(attr.getNamespaceURI(), + attr.getName()); + attrnew.setValue(attr.getValue()); + schemaNode.setAttributeNodeNS(attrnew); + if ("extensionBindingPrefixes".equals(attr.getLocalName())) { String pfxs = attr.getValue(); while (pfxs.length() > 0) { Modified: cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java URL: http://svn.apache.org/viewvc/cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java?rev=694578&r1=694577&r2=694578&view=diff ============================================================================== --- cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java (original) +++ cxf/branches/2.0.x-fixes/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/processor/internal/ProcessorUtil.java Thu Sep 11 18:37:34 2008 @@ -322,10 +322,12 @@ clone = document.createElementNS(node.getNamespaceURI(), node.getNodeName()); NamedNodeMap attributes = node.getAttributes(); for (int i = 0; i < attributes.getLength(); i++) { - Attr attr = (Attr)attributes.item(i); - ((Element)clone).setAttributeNS(attr.getNamespaceURI(), - attr.getNodeName(), - attr.getNodeValue()); + Attr attr = (Attr)attributes.item(i); + Attr attrnew = + ((Element)clone).getOwnerDocument().createAttributeNS(attr.getNamespaceURI(), + attr.getNodeName()); + attrnew.setValue(attr.getNodeValue()); + ((Element)clone).setAttributeNodeNS(attrnew); } break;