diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-10 08:15:32 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-06-10 08:15:32 +0000 |
commit | 1831c66fa90abb198249d73197aec8044bff9a04 (patch) | |
tree | 33d321ff19a10c38794884cb5e085d80c156c0b1 /sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node | |
parent | 4ebb9eeb6b4c4841fbfc521ffc67f805b1a09eda (diff) |
Flush the XML stream writer
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1134228 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node')
-rw-r--r-- | sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java index b747e947fd..aae077b11c 100644 --- a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java +++ b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java @@ -26,6 +26,7 @@ import java.util.logging.Level; import java.util.logging.Logger; import javax.xml.stream.XMLOutputFactory; +import javax.xml.stream.XMLStreamWriter; import org.apache.tuscany.sca.assembly.Component; import org.apache.tuscany.sca.assembly.ComponentService; @@ -359,11 +360,14 @@ public class NodeImpl implements Node, NodeExtension { .getFactory(XMLOutputFactory.class); try { - compositeProcessor.write(composite, outputFactory.createXMLStreamWriter(bos), new ProcessorContext(nodeFactory.registry)); + XMLStreamWriter xmlStreamWriter = outputFactory.createXMLStreamWriter(bos); + compositeProcessor.write(composite, xmlStreamWriter, new ProcessorContext(nodeFactory.registry)); + xmlStreamWriter.flush(); } catch(Exception ex) { return ex.toString(); } + String result = bos.toString(); // write out and nested composites |