diff options
Diffstat (limited to 'sca-java-2.x/trunk')
-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 |