From aef1e52d6377f18516371655c32125c68bac0cce Mon Sep 17 00:00:00 2001 From: slaws Date: Thu, 26 Mar 2009 13:23:57 +0000 Subject: TUSCANY-2931 - allow separate request and response wire formats in binding.jms. The tuscany binding.jms XSD has been extended to allow a response wireFormat element to be specified. The knock on effect of all this is that the Operation interface has been changed to allow input and output wrapper info to be held separately. Also Interface has some new operations. There are changes across the code base to take account of this interface change. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@758625 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/binding/jms/impl/JMSBindingProcessor.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'branches/sca-java-1.x/modules/binding-jms/src/main') diff --git a/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java b/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java index 34576d2d72..384444800c 100644 --- a/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java +++ b/branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java @@ -104,6 +104,8 @@ import org.apache.tuscany.sca.policy.PolicyFactory; * * * * ? + * + * ? * ? * * @@ -124,6 +126,8 @@ import org.apache.tuscany.sca.policy.PolicyFactory; * * * ? * * + * + * ? * * * Parsing error messages are recorded locally and reported as validation exceptions. Parsing @@ -474,7 +478,7 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St jmsBinding.getResponseActivationSpecProperties().putAll(parseBindingProperties(reader)); } - private void parseResponse(XMLStreamReader reader, JMSBinding jmsBinding) throws XMLStreamException { + private void parseResponse(XMLStreamReader reader, JMSBinding jmsBinding) throws ContributionReadException, XMLStreamException { // Read sub-elements of response while (true) { switch (reader.next()) { @@ -486,6 +490,16 @@ public class JMSBindingProcessor extends BaseStAXArtifactProcessor implements St parseResponseConnectionFactory(reader, jmsBinding); } else if ("activationSpec".equals(elementName)) { parseResponseActivationSpec(reader, jmsBinding); + } else { + Object extension = extensionProcessor.read(reader); + if (extension != null) { + if (extension instanceof WireFormat) { + jmsBinding.setResponseWireFormat((WireFormat)extension); + } else { + error("UnexpectedElement", reader, extension.toString()); + } + } + reader.next(); } //reader.next(); break; -- cgit v1.2.3