Author: ay Date: Wed Dec 12 15:30:41 2012 New Revision: 1420768 URL: http://svn.apache.org/viewvc?rev=1420768&view=rev Log: Merged revisions 1419484 via svn merge from https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes
........ r1419484 | ay | 2012-12-10 15:15:10 +0100 (Mon, 10 Dec 2012) | 9 lines 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.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/resources/greetMe2Req.xml (with props) cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/resources/greetMe2ReqIn1.xml (with props) Modified: cxf/branches/2.5.x-fixes/ (props changed) cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/transform/DelegatingNamespaceContext.java cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/transform/OutTransformWriterTest.java Propchange: cxf/branches/2.5.x-fixes/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/transform/DelegatingNamespaceContext.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/transform/DelegatingNamespaceContext.java?rev=1420768&r1=1420767&r2=1420768&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/transform/DelegatingNamespaceContext.java (original) +++ cxf/branches/2.5.x-fixes/common/common/src/main/java/org/apache/cxf/staxutils/transform/DelegatingNamespaceContext.java Wed Dec 12 15:30:41 2012 @@ -80,7 +80,7 @@ class DelegatingNamespaceContext impleme } } String ns = nc.getNamespaceURI(prefix); - if (ns != null) { + if (ns != null && ns.length() > 0) { addPrefix(prefix, ns); } return ns; Added: cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/resources/greetMe2Req.xml URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/resources/greetMe2Req.xml?rev=1420768&view=auto ============================================================================== --- cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/resources/greetMe2Req.xml (added) +++ cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/resources/greetMe2Req.xml Wed Dec 12 15:30:41 2012 @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> + <soap:Header/> + <soap:Body> + <greetMe xmlns="http://cxf.apache.org/hello_world_soap_http/types2"> + <requestType xmlns="">Tanya</requestType> + </greetMe> + </soap:Body> +</soap:Envelope> Propchange: cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/resources/greetMe2Req.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Added: cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/resources/greetMe2ReqIn1.xml URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/resources/greetMe2ReqIn1.xml?rev=1420768&view=auto ============================================================================== --- cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/resources/greetMe2ReqIn1.xml (added) +++ cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/resources/greetMe2ReqIn1.xml Wed Dec 12 15:30:41 2012 @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8" ?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +--> +<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> + <soap:Header/> + <soap:Body> + <greetMe xmlns="http://cxf.apache.org/hello_world_soap_http/types2"> + <requestType>Tanya</requestType> + </greetMe> + </soap:Body> +</soap:Envelope> Propchange: cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/resources/greetMe2ReqIn1.xml ------------------------------------------------------------------------------ svn:mime-type = text/xml Modified: cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/transform/OutTransformWriterTest.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/transform/OutTransformWriterTest.java?rev=1420768&r1=1420767&r2=1420768&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/transform/OutTransformWriterTest.java (original) +++ cxf/branches/2.5.x-fixes/common/common/src/test/java/org/apache/cxf/staxutils/transform/OutTransformWriterTest.java Wed Dec 12 15:30:41 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",
