Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 56224 invoked from network); 27 Jan 2010 15:47:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Jan 2010 15:47:40 -0000 Received: (qmail 67446 invoked by uid 500); 27 Jan 2010 15:47:40 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 67364 invoked by uid 500); 27 Jan 2010 15:47:40 -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 67355 invoked by uid 99); 27 Jan 2010 15:47:40 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 Jan 2010 15:47:40 +0000 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; Wed, 27 Jan 2010 15:47:37 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 0E5C823889E0; Wed, 27 Jan 2010 15:47:17 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r903693 - in /cxf/branches/2.2.x-fixes: ./ common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Date: Wed, 27 Jan 2010 15:47:17 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100127154717.0E5C823889E0@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Wed Jan 27 15:47:16 2010 New Revision: 903693 URL: http://svn.apache.org/viewvc?rev=903693&view=rev Log: Merged revisions 903680 via svnmerge from https://svn.apache.org/repos/asf/cxf/trunk ........ r903680 | dkulp | 2010-01-27 10:26:58 -0500 (Wed, 27 Jan 2010) | 2 lines [CXF-2628] Fix issues with default namespaces not getting written out. Patch from Gyorgy Orban applied ........ Modified: cxf/branches/2.2.x-fixes/ (props changed) cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Propchange: cxf/branches/2.2.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java?rev=903693&r1=903692&r2=903693&view=diff ============================================================================== --- cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java (original) +++ cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java Wed Jan 27 15:47:16 2010 @@ -468,18 +468,6 @@ // System.out.println("STAXUTILS:writeStartElement : node name : " + local + " namespace URI" + uri); boolean writeElementNS = false; - // Write out the element name - if (uri != null) { - if (prefix.length() == 0 && StringUtils.isEmpty(uri)) { - writer.writeStartElement(local); - } else { - writer.writeStartElement(prefix, local, uri); - } - } else { - writer.writeStartElement(local); - } - - if (uri != null) { writeElementNS = true; Iterator it = CastUtils.cast(writer.getNamespaceContext().getPrefixes(uri)); @@ -493,6 +481,17 @@ } } } + + // Write out the element name + if (uri != null) { + if (prefix.length() == 0 && StringUtils.isEmpty(uri)) { + writer.writeStartElement(local); + } else { + writer.writeStartElement(prefix, local, uri); + } + } else { + writer.writeStartElement(local); + } // Write out the namespaces for (int i = 0; i < reader.getNamespaceCount(); i++) {