You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by di...@apache.org on 2006/10/25 07:01:27 UTC
svn commit: r467563 - in /webservices/commons/trunk/modules/axiom:
modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java
pom.xml
Author: dims
Date: Tue Oct 24 22:01:26 2006
New Revision: 467563
URL: http://svn.apache.org/viewvc?view=rev&rev=467563
Log:
- Call flush in a few more places (especially for AXIS2-1490)
- Copy the built jars into the maven1 repo
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java
webservices/commons/trunk/modules/axiom/pom.xml
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java?view=diff&rev=467563&r1=467562&r2=467563
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMElementImpl.java Tue Oct 24 22:01:26 2006
@@ -28,6 +28,7 @@
import org.apache.axiom.om.impl.util.EmptyIterator;
import org.apache.axiom.om.impl.util.OMSerializerUtil;
import org.apache.axiom.om.util.ElementHelper;
+import org.apache.axiom.om.util.StAXUtils;
import javax.xml.namespace.QName;
import javax.xml.stream.XMLStreamConstants;
@@ -35,6 +36,7 @@
import javax.xml.stream.XMLStreamReader;
import javax.xml.stream.XMLStreamWriter;
import java.io.ByteArrayOutputStream;
+import java.io.StringWriter;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
@@ -918,19 +920,23 @@
}
public String toStringWithConsume() throws XMLStreamException {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
- this.serializeAndConsume(baos);
- return new String(baos.toByteArray());
+ StringWriter writer = new StringWriter();
+ XMLStreamWriter writer2 = StAXUtils.createXMLStreamWriter(writer);
+ this.serializeAndConsume(writer2);
+ writer2.flush();
+ return writer.toString();
}
public String toString() {
- ByteArrayOutputStream baos = new ByteArrayOutputStream();
+ StringWriter writer = new StringWriter();
try {
- this.serialize(baos);
+ XMLStreamWriter writer2 = StAXUtils.createXMLStreamWriter(writer);
+ this.serialize(writer2);
+ writer2.flush();
} catch (XMLStreamException e) {
throw new RuntimeException("Can not serialize OM Element " + this.getLocalName(), e);
}
- return new String(baos.toByteArray());
+ return writer.toString();
}
/**
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java?view=diff&rev=467563&r1=467562&r2=467563
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-impl/src/main/java/org/apache/axiom/om/impl/llom/OMSourcedElementImpl.java Tue Oct 24 22:01:26 2006
@@ -17,6 +17,7 @@
package org.apache.axiom.om.impl.llom;
import org.apache.axiom.om.*;
+import org.apache.axiom.om.util.StAXUtils;
import org.apache.axiom.om.impl.builder.StAXOMBuilder;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -458,8 +459,10 @@
return super.toStringWithConsume();
} else {
StringWriter writer = new StringWriter();
- dataSource.serialize(writer, new OMOutputFormat());
- return writer.toString();
+ XMLStreamWriter writer2 = StAXUtils.createXMLStreamWriter(writer);
+ dataSource.serialize(writer2);
+ writer2.flush();
+ return writer.toString();
}
}
Modified: webservices/commons/trunk/modules/axiom/pom.xml
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/pom.xml?view=diff&rev=467563&r1=467562&r2=467563
==============================================================================
--- webservices/commons/trunk/modules/axiom/pom.xml (original)
+++ webservices/commons/trunk/modules/axiom/pom.xml Tue Oct 24 22:01:26 2006
@@ -76,8 +76,8 @@
<email>ruchith AT wso2.com</email>
<organization>WSO2</organization>
</developer>
- <developer>
- <id>thilina</id>
+ <developer>
+ <id>thilina</id>
<name>Thilina Gunarathne</name>
<email>thilina AT wso2.com</email>
<url>http://www.apache.org/~thilina</url>
@@ -259,6 +259,21 @@
<configuration>
<attach>true</attach>
</configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-one-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>install-maven-one-repository</goal>
+ <goal>deploy-maven-one-repository</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <remoteRepositoryId>apache</remoteRepositoryId>
+ <remoteRepositoryUrl>scp://people.apache.org/www/cvs.apache.org/repository</remoteRepositoryUrl>
+ </configuration>
</plugin>
</plugins>
</build>
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org