diff options
Diffstat (limited to 'java/sca/modules/assembly-xml')
4 files changed, 6 insertions, 13 deletions
diff --git a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java index 4034ba3612..dbce9d2d8d 100644 --- a/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java +++ b/java/sca/modules/assembly-xml/src/main/java/org/apache/tuscany/sca/assembly/xml/BaseAssemblyProcessor.java @@ -211,7 +211,7 @@ abstract class BaseAssemblyProcessor extends BaseStAXArtifactProcessor { * @throws XMLStreamException */ protected void writeStart(XMLStreamWriter writer, String name, XAttr... attrs) throws XMLStreamException { - writeStart(writer, SCA11_NS, name, attrs); + super.writeStart(writer, SCA11_NS, name, attrs); } /** @@ -220,10 +220,7 @@ abstract class BaseAssemblyProcessor extends BaseStAXArtifactProcessor { * @throws XMLStreamException */ protected void writeStartDocument(XMLStreamWriter writer, String name, XAttr... attrs) throws XMLStreamException { - writer.writeStartDocument(); - writer.setDefaultNamespace(SCA11_NS); - writeStart(writer, SCA11_NS, name, attrs); - writer.writeDefaultNamespace(SCA11_NS); + super.writeStartDocument(writer, SCA11_NS, name, attrs); } /** diff --git a/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteAnyAttributeTestCase.java b/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteAnyAttributeTestCase.java index a4f0da5ae9..15754b32e4 100644 --- a/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteAnyAttributeTestCase.java +++ b/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteAnyAttributeTestCase.java @@ -25,7 +25,6 @@ import static org.junit.Assert.assertNotNull; import java.io.ByteArrayOutputStream; import java.io.StringReader; -import javax.xml.namespace.QName; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLOutputFactory; import javax.xml.stream.XMLStreamReader; @@ -46,11 +45,8 @@ import org.junit.Test; */ public class ReadWriteAnyAttributeTestCase { - private static final QName EXTENDED_ATTRIBUTE = new QName("http://test", "customAttribute"); - private static final String XML = "<?xml version='1.0' encoding='UTF-8'?>"+ "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200903\" " + - "xmlns:ns1=\"http://docs.oasis-open.org/ns/opencsa/sca/200903\" " + "targetNamespace=\"http://calc\" " + "name=\"Calculator\">"+ "<component name=\"AddServiceComponent\" xmlns:test=\"http://test\" test:customAttribute=\"customValue\">"+ diff --git a/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteAnyElementTestCase.java b/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteAnyElementTestCase.java index 256c706035..0b04c43ad5 100644 --- a/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteAnyElementTestCase.java +++ b/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteAnyElementTestCase.java @@ -43,7 +43,7 @@ import org.junit.Test; public class ReadWriteAnyElementTestCase { private static final String XML_RECURSIVE_EXTENDED_ELEMENT = "<?xml version='1.0' encoding='UTF-8'?>" + - "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200903\" xmlns:ns1=\"http://docs.oasis-open.org/ns/opencsa/sca/200903\" targetNamespace=\"http://temp\" name=\"RecursiveExtendedElement\">" + + "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200903\" targetNamespace=\"http://temp\" name=\"RecursiveExtendedElement\">" + "<unknownElement>" + "<subUnknownElement1 attribute=\"anyAttribute\" />" + "<subUnknownElement2 />" + @@ -52,7 +52,7 @@ public class ReadWriteAnyElementTestCase { private static final String XML_UNKNOWN_IMPL = "<?xml version='1.0' encoding='UTF-8'?>" + - "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200903\" xmlns:ns1=\"http://docs.oasis-open.org/ns/opencsa/sca/200903\" targetNamespace=\"http://temp\" name=\"aaaa\" autowire=\"false\">" + + "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200903\" targetNamespace=\"http://temp\" name=\"aaaa\" autowire=\"false\">" + "<component name=\"unknownImpl\">" + "<implementation.unknown class=\"raymond\" />" + "<service name=\"service\">" + @@ -63,7 +63,7 @@ public class ReadWriteAnyElementTestCase { private static final String XML_UNKNOWN_IMPL_WITH_INVALID_ATTRIBUTE = "<?xml version='1.0' encoding='UTF-8'?>" + - "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200903\" xmlns:ns1=\"http://docs.oasis-open.org/ns/opencsa/sca/200903\" targetNamespace=\"http://temp\" name=\"aaaa\" autowire=\"false\">" + + "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200903\" targetNamespace=\"http://temp\" name=\"aaaa\" autowire=\"false\">" + "<component name=\"unknownImpl\">" + "<implementation.unknown class=\"raymond\" />" + "<service name=\"service\" requires=\"\">" + diff --git a/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteLocalCompositeTestCase.java b/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteLocalCompositeTestCase.java index bd21c0630e..e86da1c8b4 100644 --- a/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteLocalCompositeTestCase.java +++ b/java/sca/modules/assembly-xml/src/test/java/org/apache/tuscany/sca/assembly/xml/ReadWriteLocalCompositeTestCase.java @@ -52,7 +52,7 @@ public class ReadWriteLocalCompositeTestCase { private ExtensibleStAXArtifactProcessor staxProcessor; private static final String LOCAL_COMPOSITE_XML = "<?xml version='1.0' encoding='UTF-8'?>"+ - "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200903\" xmlns:ns1=\"http://docs.oasis-open.org/ns/opencsa/sca/200903\" targetNamespace=\"http://localcalc\" name=\"LocalCalculator\" local=\"true\">"+ + "<composite xmlns=\"http://docs.oasis-open.org/ns/opencsa/sca/200903\" targetNamespace=\"http://localcalc\" name=\"LocalCalculator\" local=\"true\">"+ "</composite>"; @Before |