summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/implementation-java-xml/src/test/java/org
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-09-02 22:45:54 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2009-09-02 22:45:54 +0000
commit6b614afbc3f08ded00a70bf9cf976d9bad12b4a7 (patch)
tree410ae74a08c76bae0e4b868c6e56bcbd2140e717 /branches/sca-java-1.x/modules/implementation-java-xml/src/test/java/org
parent5dc6635594ad4a6f08ecf61ac30b82333a418686 (diff)
Merge from 1.5.1:
1) Fix for TUSCANY-3238 2) Remove calls to XMLStreamWriter.setPrefix() as writeNamespace() invokes it internally (TUSCANY-3212) git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@810726 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/implementation-java-xml/src/test/java/org')
-rw-r--r--branches/sca-java-1.x/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/WriteTestCase.java14
1 files changed, 8 insertions, 6 deletions
diff --git a/branches/sca-java-1.x/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/WriteTestCase.java b/branches/sca-java-1.x/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/WriteTestCase.java
index 646b5db617..d1c72861e3 100644
--- a/branches/sca-java-1.x/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/WriteTestCase.java
+++ b/branches/sca-java-1.x/modules/implementation-java-xml/src/test/java/org/apache/tuscany/sca/implementation/java/xml/WriteTestCase.java
@@ -6,15 +6,15 @@
* 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.
+ * under the License.
*/
package org.apache.tuscany.sca.implementation.java.xml;
@@ -35,7 +35,7 @@ import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry;
/**
* Test writing Java implementations.
- *
+ *
* @version $Rev$ $Date$
*/
public class WriteTestCase extends TestCase {
@@ -43,22 +43,24 @@ public class WriteTestCase extends TestCase {
private StAXArtifactProcessor<Object> staxProcessor;
private XMLInputFactory inputFactory;
private XMLOutputFactory outputFactory;
-
+
@Override
public void setUp() throws Exception {
DefaultExtensionPointRegistry extensionPoints = new DefaultExtensionPointRegistry();
inputFactory = XMLInputFactory.newInstance();
outputFactory = XMLOutputFactory.newInstance();
+ // outputFactory.setProperty(XMLOutputFactory.IS_REPAIRING_NAMESPACES, Boolean.TRUE);
StAXArtifactProcessorExtensionPoint staxProcessors = extensionPoints.getExtensionPoint(StAXArtifactProcessorExtensionPoint.class);
staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, inputFactory, outputFactory, null);
}
public void testReadWriteComposite() throws Exception {
- InputStream is = getClass().getResourceAsStream("Calculator.composite");
+ InputStream is = getClass().getResourceAsStream("default.composite");
Composite composite = (Composite)staxProcessor.read(inputFactory.createXMLStreamReader(is));
assertNotNull(composite);
ByteArrayOutputStream bos = new ByteArrayOutputStream();
staxProcessor.write(composite, outputFactory.createXMLStreamWriter(bos));
+ System.out.println(new String(bos.toByteArray()));
}
}