Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 69073 invoked from network); 9 May 2008 18:43:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 May 2008 18:43:32 -0000 Received: (qmail 73406 invoked by uid 500); 9 May 2008 18:43:33 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 73350 invoked by uid 500); 9 May 2008 18:43:33 -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 73339 invoked by uid 99); 9 May 2008 18:43:33 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 09 May 2008 11:43:33 -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, 09 May 2008 18:42:56 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 508772388A1A; Fri, 9 May 2008 11:43:11 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r654910 - in /cxf/branches/2.0.x-fixes: ./ common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Date: Fri, 09 May 2008 18:43:11 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080509184311.508772388A1A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Fri May 9 11:43:10 2008 New Revision: 654910 URL: http://svn.apache.org/viewvc?rev=654910&view=rev Log: Merged revisions 654899 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r654899 | dkulp | 2008-05-09 14:02:01 -0400 (Fri, 09 May 2008) | 2 lines [CXF-1581] Fix problems with ?wsdl with sun stax implemenations ........ Modified: cxf/branches/2.0.x-fixes/ (props changed) cxf/branches/2.0.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Propchange: cxf/branches/2.0.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. 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=654910&r1=654909&r2=654910&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 Fri May 9 11:43:10 2008 @@ -516,7 +516,15 @@ declareNamespace = false; } } else { - writer.writeAttribute(attrPrefix, attr.getNamespaceURI(), name, attr.getNodeValue()); + String attns = attr.getNamespaceURI(); + String value = attr.getNodeValue(); + if (attns == null || attns.length() == 0) { + writer.writeAttribute(name, value); + } else if (attrPrefix == null || attrPrefix.length() == 0) { + writer.writeAttribute(attns, name, value); + } else { + writer.writeAttribute(attrPrefix, attns, name, value); + } } } }