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 2009/06/17 17:29:46 UTC
svn commit: r785673 - in /cxf/branches/2.1.x-fixes: ./
rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java
Author: dkulp
Date: Wed Jun 17 15:29:42 2009
New Revision: 785673
URL: http://svn.apache.org/viewvc?rev=785673&view=rev
Log:
Merged revisions 785656 via svnmerge from
https://svn.apache.org/repos/asf/cxf/branches/2.2.x-fixes
................
r785656 | dkulp | 2009-06-17 11:18:47 -0400 (Wed, 17 Jun 2009) | 10 lines
Merged revisions 785468 via svnmerge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r785468 | dkulp | 2009-06-16 22:31:54 -0400 (Tue, 16 Jun 2009) | 2 lines
[CXF-2294] Fix issue in http binding that is preventing code that works
with 2.0.11 to not work with 2.1 and 2.2.
........
................
Modified:
cxf/branches/2.1.x-fixes/ (props changed)
cxf/branches/2.1.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java
Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jun 17 15:29:42 2009
@@ -1,2 +1,2 @@
-/cxf/branches/2.2.x-fixes:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,777243,777481,777505,777572,777580,780033,780184,780213,780421,780664,780800,780902,780911,781497,781841,782733,782735-782736,783099,783407,784064,784197,785293,785296,785298-785299,785301
-/cxf/trunk:782181,782728-782730,783097,783396,784059,784181,784895,785279-785282
+/cxf/branches/2.2.x-fixes:743446,753380,753397,753421,754585,755365,757499,757859,757899,757935,757951,758195,758303,758308,758378,758690,758910,759890,759961,759963-759964,759966,760029,760073,760150,760171,760178,760198,760212,760456,760468,760582,760938,761094,761113,761120,761317,761759,761789,762393,762518,762567,763200,763272,763495,763854,763931,763942,763953,764033-764034,764581,764599-764606,764887,765357,766013,766058,766100-766101,766763,766770,766860,766962-766963,767159,767191,767927,771416,772143,772402,772658,772714,773009-773010,773027,773049,773146,773581,773691,773693,774446-774496,774558,774760,774851,774979,775423,776024-776025,776218,776429,776459,777189,777224,777243,777481,777505,777572,777580,780033,780184,780213,780421,780664,780800,780902,780911,781497,781841,782733,782735-782736,783099,783407,784064,784197,785293,785296,785298-785299,785301,785656
+/cxf/trunk:782181,782728-782730,783097,783396,784059,784181,784895,785279-785282,785468
Propchange: cxf/branches/2.1.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified: cxf/branches/2.1.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.1.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java?rev=785673&r1=785672&r2=785673&view=diff
==============================================================================
--- cxf/branches/2.1.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java (original)
+++ cxf/branches/2.1.x-fixes/rt/bindings/http/src/main/java/org/apache/cxf/binding/http/IriDecoderHelper.java Wed Jun 17 15:29:42 2009
@@ -29,12 +29,14 @@
import javax.xml.XMLConstants;
import javax.xml.namespace.QName;
+import org.w3c.dom.Attr;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.apache.cxf.common.i18n.BundleUtils;
import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.util.StringUtils;
import org.apache.cxf.helpers.DOMUtils;
import org.apache.cxf.helpers.IOUtils;
import org.apache.cxf.interceptor.Fault;
@@ -237,8 +239,10 @@
XmlSchemaSequence seq = (XmlSchemaSequence)cplxType.getParticle();
- Element e = doc.createElementNS(qname.getNamespaceURI(), qname.getLocalPart());
- e.setAttribute(XMLConstants.XMLNS_ATTRIBUTE, qname.getNamespaceURI());
+ Element e = doc.createElementNS(qname.getNamespaceURI(), "ns1:" + qname.getLocalPart());
+ Attr ns = doc.createAttributeNS(XMLConstants.XMLNS_ATTRIBUTE_NS_URI, "xmlns:ns1");
+ e.setAttributeNodeNS(ns);
+ ns.setNodeValue(qname.getNamespaceURI());
doc.appendChild(e);
if (seq == null || seq.getItems() == null) {
@@ -255,13 +259,18 @@
}
}
Element ec = null;
- if (unQualified) {
+ QName qn = elChild.getQName();
+ if (StringUtils.isEmpty(qn.getNamespaceURI()) && unQualified) {
ec = doc.createElement(elChild.getQName().getLocalPart());
} else {
- ec = doc.createElementNS(elChild.getQName().getNamespaceURI(), elChild.getQName()
- .getLocalPart());
+
if (!elChild.getQName().getNamespaceURI().equals(qname.getNamespaceURI())) {
+ ec = doc.createElementNS(elChild.getQName().getNamespaceURI(),
+ elChild.getQName().getLocalPart());
ec.setAttribute(XMLConstants.XMLNS_ATTRIBUTE, elChild.getQName().getNamespaceURI());
+ } else {
+ ec = doc.createElementNS(elChild.getQName().getNamespaceURI(),
+ "ns1:" + elChild.getQName().getLocalPart());
}
}