diff options
author | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-14 06:54:03 +0000 |
---|---|---|
committer | rfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68> | 2009-08-14 06:54:03 +0000 |
commit | 1d6516b79fb3a086b7002bfdda54ac2651ca58be (patch) | |
tree | d2f2a1a78ebe68ea8f44bd0c299c27ff105dc4ad /branches/sca-java-1.5.1/modules/extension-helper | |
parent | a0cde52968abd25f8d86804b90177c7a44ceb1a5 (diff) |
Remove calls to XMLStreamWriter.setPrefix() as writeNamespace() invokes it internally (TUSCANY-3212)
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@804091 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.5.1/modules/extension-helper')
-rw-r--r-- | branches/sca-java-1.5.1/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/impl/BindingSCDLProcessor.java | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/branches/sca-java-1.5.1/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/impl/BindingSCDLProcessor.java b/branches/sca-java-1.5.1/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/impl/BindingSCDLProcessor.java index 8a83f630e9..8b99701baa 100644 --- a/branches/sca-java-1.5.1/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/impl/BindingSCDLProcessor.java +++ b/branches/sca-java-1.5.1/modules/extension-helper/src/main/java/org/apache/tuscany/sca/extension/helper/impl/BindingSCDLProcessor.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.extension.helper.impl; @@ -45,7 +45,7 @@ import org.apache.tuscany.sca.extension.helper.utils.AbstractBinding; /** * An SCDL ArtifactProcessor which uses the Binding class getters/setters * to define the SCDL attributes. - * + * * TODO: merge this with SCDLProcessor * * @version $Rev$ $Date$ @@ -126,7 +126,7 @@ public class BindingSCDLProcessor implements StAXArtifactProcessor { //FIXME: none of the attributes of Binding seem to be working with PojoBinding // For now at least read the binding URI String uri = reader.getAttributeValue(null, "uri"); - + if (elementTextSetter != null) { try { String value = reader.getElementText(); @@ -144,7 +144,7 @@ public class BindingSCDLProcessor implements StAXArtifactProcessor { if (!(impl instanceof Binding)) { impl = new PojoBinding(impl); - + //FIXME: none of the attributes of Binding seem to be working with PojoBinding // For now at least read the binding URI if (uri != null) { @@ -161,8 +161,8 @@ public class BindingSCDLProcessor implements StAXArtifactProcessor { //FIXME: none of the attributes of Binding seem to be working with PojoBinding // For now at least write the binding URI - - // Find a namespace prefix and write the element + + // Find a namespace prefix and write the element String prefix = writer.getPrefix(scdlQName.getNamespaceURI()); if (prefix == null) { NamespaceContext nsc = writer.getNamespaceContext(); @@ -172,9 +172,10 @@ public class BindingSCDLProcessor implements StAXArtifactProcessor { break; } } - writer.setPrefix(prefix, scdlQName.getNamespaceURI()); + // writer.setPrefix(prefix, scdlQName.getNamespaceURI()); } writer.writeStartElement(scdlQName.getNamespaceURI(), scdlQName.getLocalPart()); + writer.writeNamespace(prefix, scdlQName.getNamespaceURI()); // Write the binding URI attribute String uri; @@ -186,7 +187,7 @@ public class BindingSCDLProcessor implements StAXArtifactProcessor { if (uri != null) { writer.writeAttribute("uri", uri); } - + writer.writeEndElement(); } |