You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2010/01/27 16:47:17 UTC
svn commit: r903693 - in /cxf/branches/2.2.x-fixes: ./
common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
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<String> 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++) {