cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject svn commit: r1152000 - in /cxf/trunk/common/common/src: main/java/org/apache/cxf/staxutils/transform/ test/java/org/apache/cxf/staxutils/transform/
Date Thu, 28 Jul 2011 20:55:56 GMT
Author: ay
Date: Thu Jul 28 20:55:55 2011
New Revision: 1152000

URL: http://svn.apache.org/viewvc?rev=1152000&view=rev
Log:
reparing uninteded errors from previos commit for CXF-3692

Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/transform/ElementProperty.java
    cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/transform/InTransformReader.java
    cxf/trunk/common/common/src/test/java/org/apache/cxf/staxutils/transform/InTransformReaderTest.java

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/transform/ElementProperty.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/transform/ElementProperty.java?rev=1152000&r1=1151999&r2=1152000&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/transform/ElementProperty.java
(original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/transform/ElementProperty.java
Thu Jul 28 20:55:55 2011
@@ -1,58 +1,58 @@
-/**
- * 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.
- */
-
-package org.apache.cxf.staxutils.transform;
-
-import javax.xml.namespace.QName;
-
-/**
- * 
- */
-class ElementProperty {
-    private QName name;
-    private String text;
-    private boolean child;
-    
-    public ElementProperty(QName name, String text, boolean child) {
-        this.name = name;
-        this.text = text;
-        this.child = child;
-    }
-
-    /** 
-     * @return Returns the name.
-     */
-    public QName getName() {
-        return name;
-    }
-
-    /** 
-     * @return Returns the text.
-     */
-    public String getText() {
-        return text;
-    }
-
-    /** 
-     * @return Returns the child.
-     */
-    public boolean isChild() {
-        return child;
-    }
-}
+/**
+ * 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.
+ */
+
+package org.apache.cxf.staxutils.transform;
+
+import javax.xml.namespace.QName;
+
+/**
+ * 
+ */
+class ElementProperty {
+    private QName name;
+    private String text;
+    private boolean child;
+    
+    public ElementProperty(QName name, String text, boolean child) {
+        this.name = name;
+        this.text = text;
+        this.child = child;
+    }
+
+    /** 
+     * @return Returns the name.
+     */
+    public QName getName() {
+        return name;
+    }
+
+    /** 
+     * @return Returns the text.
+     */
+    public String getText() {
+        return text;
+    }
+
+    /** 
+     * @return Returns the child.
+     */
+    public boolean isChild() {
+        return child;
+    }
+}

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/transform/InTransformReader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/transform/InTransformReader.java?rev=1152000&r1=1151999&r2=1152000&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/transform/InTransformReader.java
(original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/transform/InTransformReader.java
Thu Jul 28 20:55:55 2011
@@ -58,6 +58,14 @@ public class InTransformReader extends D
     private DelegatingNamespaceContext namespaceContext;
 
     public InTransformReader(XMLStreamReader reader, 
+                             Map<String, String> inMap,
+                             Map<String, String> appendMap,
+                             boolean blockOriginalReader) {
+        
+        this(reader, inMap, appendMap, null, null, blockOriginalReader);
+    }
+    
+    public InTransformReader(XMLStreamReader reader, 
                              Map<String, String> inEMap,
                              Map<String, String> appendMap,
                              List<String> dropESet,

Modified: cxf/trunk/common/common/src/test/java/org/apache/cxf/staxutils/transform/InTransformReaderTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/test/java/org/apache/cxf/staxutils/transform/InTransformReaderTest.java?rev=1152000&r1=1151999&r2=1152000&view=diff
==============================================================================
--- cxf/trunk/common/common/src/test/java/org/apache/cxf/staxutils/transform/InTransformReaderTest.java
(original)
+++ cxf/trunk/common/common/src/test/java/org/apache/cxf/staxutils/transform/InTransformReaderTest.java
Thu Jul 28 20:55:55 2011
@@ -209,29 +209,6 @@ public class InTransformReaderTest exten
         verifyReaders(filteredReader, reader2, false);
     }
     
-    @Test
-    public void testReadPartial() throws Exception {
-        XMLStreamReader reader = 
-            StaxUtils.createXMLStreamReader(
-                      InTransformReader.class.getResourceAsStream("../resources/complexReqIn4.xml"));
       
-        
-        Map<String, String> inMap = new HashMap<String, String>();
-        inMap.put("{http://cxf.apache.org/transform/header/element}*", 
-                "{http://cxf.apache.org/transform/header/element}*");
-        
-        // set the block original reader flag to true
-        reader = new InTransformReader(reader, 
-                                       inMap, null, null,
-                                       null, true);
-        
-        QName bodyTag = new QName("http://schemas.xmlsoap.org/soap/envelope/", "Body");
-        PartialXMLStreamReader filteredReader = new PartialXMLStreamReader(reader, bodyTag);
-        
-        XMLStreamReader reader2 = 
-            StaxUtils.createXMLStreamReader(
-                InTransformReader.class.getResourceAsStream("../resources/complexReq4partial.xml"));
       
-        verifyReaders(filteredReader, reader2, false);
-    }
     
     @Test
     public void testReadWithRepaceAppend() throws Exception {
@@ -356,7 +333,7 @@ public class InTransformReaderTest exten
     }
 
     @Test
-    public void testReadWithAppendPostWrap() throws Exception {
+    public void testReadWithAppendPostWrap1() throws Exception {
         Map<String, String> appendElements = new HashMap<String, String>();
         appendElements.put("{http://www.w3.org/2003/05/soap-envelope}Body/",
                            "{http://apache.org/cxf/calculator/types}add");
@@ -410,14 +387,6 @@ public class InTransformReaderTest exten
      */
     private void verifyReaders(XMLStreamReader reader, XMLStreamReader teacher, 
                                boolean eec) throws XMLStreamException {
-        /*
-        if (true) {
-            System.out.println(">>>>>>>>>");
-            StaxUtils.copy(reader, System.out);
-            System.out.println("<<<<<<<<<");
-            return;
-        }
-        */
         // compare the elements and attributes while ignoring comments, line breaks, etc
         for (;;) {
             int revent = getNextEvent(reader);



Mime
View raw message