cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1419484 - in /cxf/branches/2.6.x-fixes: ./ api/src/main/java/org/apache/cxf/staxutils/transform/ api/src/test/java/org/apache/cxf/staxutils/resources/ api/src/test/java/org/apache/cxf/staxutils/transform/
Date Mon, 10 Dec 2012 14:15:11 GMT
Author: ay
Date: Mon Dec 10 14:15:10 2012
New Revision: 1419484

URL: http://svn.apache.org/viewvc?rev=1419484&view=rev
Log:
Merged revisions 1419367 via  svn merge from
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1419367 | ay | 2012-12-10 13:17:59 +0100 (Mon, 10 Dec 2012) | 1 line
  
  [CXF-4689] stax outTransform feature may fail to remove the default namespace
........

Added:
    cxf/branches/2.6.x-fixes/api/src/test/java/org/apache/cxf/staxutils/resources/greetMe2Req.xml
      - copied unchanged from r1419367, cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/resources/greetMe2Req.xml
    cxf/branches/2.6.x-fixes/api/src/test/java/org/apache/cxf/staxutils/resources/greetMe2ReqIn1.xml
      - copied unchanged from r1419367, cxf/trunk/api/src/test/java/org/apache/cxf/staxutils/resources/greetMe2ReqIn1.xml
Modified:
    cxf/branches/2.6.x-fixes/   (props changed)
    cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/transform/DelegatingNamespaceContext.java
    cxf/branches/2.6.x-fixes/api/src/test/java/org/apache/cxf/staxutils/transform/OutTransformWriterTest.java

Propchange: cxf/branches/2.6.x-fixes/
            ('svn:mergeinfo' removed)

Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/transform/DelegatingNamespaceContext.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/transform/DelegatingNamespaceContext.java?rev=1419484&r1=1419483&r2=1419484&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/transform/DelegatingNamespaceContext.java
(original)
+++ cxf/branches/2.6.x-fixes/api/src/main/java/org/apache/cxf/staxutils/transform/DelegatingNamespaceContext.java
Mon Dec 10 14:15:10 2012
@@ -82,7 +82,7 @@ class DelegatingNamespaceContext impleme
             }
         }
         String ns = nc.getNamespaceURI(prefix);
-        if (ns != null) {
+        if (ns != null && ns.length() > 0) {
             addPrefix(prefix, ns);
         }
         return ns;

Modified: cxf/branches/2.6.x-fixes/api/src/test/java/org/apache/cxf/staxutils/transform/OutTransformWriterTest.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/api/src/test/java/org/apache/cxf/staxutils/transform/OutTransformWriterTest.java?rev=1419484&r1=1419483&r2=1419484&view=diff
==============================================================================
--- cxf/branches/2.6.x-fixes/api/src/test/java/org/apache/cxf/staxutils/transform/OutTransformWriterTest.java
(original)
+++ cxf/branches/2.6.x-fixes/api/src/test/java/org/apache/cxf/staxutils/transform/OutTransformWriterTest.java
Mon Dec 10 14:15:10 2012
@@ -300,6 +300,20 @@ public class OutTransformWriterTest exte
     }
     
     @Test
+    public void testRemoveOneDefaultNamespace() throws Exception {
+        Map<String, String> inMap = new HashMap<String, String>();
+        inMap.put("{http://cxf.apache.org/hello_world_soap_http/types2}requestType", "requestType");

+        XMLStreamReader reader = 
+            TransformTestUtils.createOutTransformedStreamReader("../resources/greetMe2ReqIn1.xml",

+                                                                inMap, null, null, null,
false, null);
+        
+        XMLStreamReader reader2 = 
+            StaxUtils.createXMLStreamReader(
+                InTransformReader.class.getResourceAsStream("../resources/greetMe2Req.xml"));
+        TransformTestUtils.verifyReaders(reader2, reader, true, true);
+    }
+
+    @Test
     public void testReadWithReplaceAppend() throws Exception {
         Map<String, String> transformElements = new HashMap<String, String>();
         transformElements.put("requestValue",



Mime
View raw message