summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/binding-jms
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-03-26 13:23:57 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-03-26 13:23:57 +0000
commitaef1e52d6377f18516371655c32125c68bac0cce (patch)
tree598aeb93747d119998df3f87b22eacb0125efaa3 /branches/sca-java-1.x/modules/binding-jms
parentde53364092d375a98144b29e85e09abc8842268e (diff)
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
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-jms')
-rw-r--r--branches/sca-java-1.x/modules/binding-jms/src/main/java/org/apache/tuscany/sca/binding/jms/impl/JMSBindingProcessor.java16
1 files changed, 15 insertions, 1 deletions
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;
* <activationSpec name="xs:anyURI" create="string"?>
* <property name="NMTOKEN" type="NMTOKEN">*
* </activationSpec>?
+ *
+ * <wireFormat.someWireFormat/>?
* </response>?
*
* <complexType name="SubscriptionHeaders">
@@ -124,6 +126,8 @@ import org.apache.tuscany.sca.policy.PolicyFactory;
* <property name="NMTOKEN" type="NMTOKEN">*
* </headers>?
* </operationProperties>*
+ *
+ * <wireFormat.someWireFormat/>?
* </binding.jms>
*
* 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;