diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-08 05:36:58 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-08 05:36:58 +0000 |
commit | 045dd1198ce46b36d1944e922aaf4370be8b479d (patch) | |
tree | 88da83215431fe76425cd709a0364392ecf902ee /java/sca/modules/binding-http/src/main | |
parent | d5271b899bb96b72fae44a76aab2a7a6d214e0d3 (diff) |
Moving code to use HTTPBinding type instead of local qname
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@823027 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules/binding-http/src/main')
-rw-r--r-- | java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java b/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java index 30da7a277c..baa0e44087 100644 --- a/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java +++ b/java/sca/modules/binding-http/src/main/java/org/apache/tuscany/sca/binding/http/xml/HTTPBindingProcessor.java @@ -45,9 +45,6 @@ import org.apache.tuscany.sca.monitor.Problem; import org.apache.tuscany.sca.monitor.Problem.Severity; public class HTTPBindingProcessor extends BaseStAXArtifactProcessor implements StAXArtifactProcessor<HTTPBinding> { - private static final String BINDING_HTTP = "binding.http"; - private static final QName BINDING_HTTP_QNAME = HTTPBinding.TYPE; - private static final String NAME = "name"; private static final String URI = "uri"; @@ -68,7 +65,7 @@ public class HTTPBindingProcessor extends BaseStAXArtifactProcessor implements S } public QName getArtifactType() { - return BINDING_HTTP_QNAME; + return HTTPBinding.TYPE; } public Class<HTTPBinding> getModelType() { @@ -85,7 +82,7 @@ public class HTTPBindingProcessor extends BaseStAXArtifactProcessor implements S case START_ELEMENT: elementName = reader.getName(); - if (BINDING_HTTP_QNAME.equals(elementName)) { + if (HTTPBinding.TYPE.equals(elementName)) { String name = getString(reader, NAME); if(name != null) { httpBinding.setName(name); @@ -108,7 +105,7 @@ public class HTTPBindingProcessor extends BaseStAXArtifactProcessor implements S } } - if (event == END_ELEMENT && BINDING_HTTP_QNAME.equals(reader.getName())) { + if (event == END_ELEMENT && HTTPBinding.TYPE.equals(reader.getName())) { break; } @@ -124,7 +121,7 @@ public class HTTPBindingProcessor extends BaseStAXArtifactProcessor implements S public void write(HTTPBinding httpBinding, XMLStreamWriter writer) throws ContributionWriteException, XMLStreamException { //writer.writeStartElement(Constants.SCA10_NS, BINDING_HTTP); - writeStart(writer, BINDING_HTTP_QNAME.getNamespaceURI(), BINDING_HTTP_QNAME.getLocalPart()); + writeStart(writer, HTTPBinding.TYPE.getNamespaceURI(), HTTPBinding.TYPE.getLocalPart()); // Write binding name if (httpBinding.getName() != null) { |