cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bimargul...@apache.org
Subject svn commit: r725455 - in /cxf/trunk/distribution/src/main/release/samples/aegis_standalone: pom.xml src/org/apache/cxf/demo/aegis/commands/WriteZoo.java
Date Wed, 10 Dec 2008 22:02:39 GMT
Author: bimargulies
Date: Wed Dec 10 14:02:38 2008
New Revision: 725455

URL: http://svn.apache.org/viewvc?rev=725455&view=rev
Log:
Indent the XML written by the sample. What a lot of trouble for something so simple.

Modified:
    cxf/trunk/distribution/src/main/release/samples/aegis_standalone/pom.xml
    cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/commands/WriteZoo.java

Modified: cxf/trunk/distribution/src/main/release/samples/aegis_standalone/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/aegis_standalone/pom.xml?rev=725455&r1=725454&r2=725455&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/aegis_standalone/pom.xml (original)
+++ cxf/trunk/distribution/src/main/release/samples/aegis_standalone/pom.xml Wed Dec 10 14:02:38
2008
@@ -120,9 +120,15 @@
             <version>${cxf.version}</version>
         </dependency>
 	<dependency>
-	  <groupId>org.codehaus.staxmate</groupId>
-	  <artifactId>staxmate</artifactId>
-	  <version>1.3.0</version>
+	  <groupId>net.java.dev.stax-utils</groupId>
+	  <artifactId>stax-utils</artifactId>
+	  <version>20060502</version>
+	  <exclusions>
+	    <exclusion>
+	      <groupId>com.bea.xml</groupId>
+	      <artifactId>jsr173-ri</artifactId>
+	    </exclusion>
+	  </exclusions>
 	</dependency>
     </dependencies>
 </project>

Modified: cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/commands/WriteZoo.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/commands/WriteZoo.java?rev=725455&r1=725454&r2=725455&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/commands/WriteZoo.java
(original)
+++ cxf/trunk/distribution/src/main/release/samples/aegis_standalone/src/org/apache/cxf/demo/aegis/commands/WriteZoo.java
Wed Dec 10 14:02:38 2008
@@ -25,7 +25,11 @@
 import java.util.Map;
 import java.util.Set;
 
+import javanet.staxutils.IndentingXMLStreamWriter;
+import javanet.staxutils.XMLStreamEventWriter;
+
 import javax.xml.namespace.QName;
+import javax.xml.stream.XMLEventWriter;
 import javax.xml.stream.XMLOutputFactory;
 import javax.xml.stream.XMLStreamWriter;
 
@@ -34,8 +38,6 @@
 import org.apache.cxf.aegis.type.Type;
 import org.apache.cxf.demo.aegis.types.Animal;
 import org.apache.cxf.demo.aegis.types.Zoo;
-import org.codehaus.staxmate.SMOutputFactory;
-import org.codehaus.staxmate.out.SMOutputDocument;
 
 /**
  * 
@@ -60,14 +62,13 @@
         AegisWriter<XMLStreamWriter> writer = context.createXMLStreamWriter();
         FileOutputStream output = new FileOutputStream(outputPathname);
         XMLStreamWriter xmlWriter = outputFactory.createXMLStreamWriter(output);
-        SMOutputDocument smOutput = SMOutputFactory.createOutputDocument(xmlWriter);
-        smOutput.setIndentation("\n  ", 1, 2);
+        IndentingXMLStreamWriter indentWriter = new IndentingXMLStreamWriter(xmlWriter);
+        
         Zoo zoo = populateZoo();
         Type aegisType = context.getTypeMapping().getType(zoo.getClass());
         writer.write(zoo, new QName("urn:aegis:demo", "zoo"),
-                      false, xmlWriter, aegisType);
+                      false, indentWriter, aegisType);
         xmlWriter.close();
-        smOutput.closeRoot();
         output.close();
     }
     



Mime
View raw message