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 2008/05/09 20:43:11 UTC
svn commit: r654910 - in /cxf/branches/2.0.x-fixes: ./
common/common/src/main/java/org/apache/cxf/staxutils/StaxUtils.java
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);
+ }
}
}
}