summaryrefslogtreecommitdiffstats
path: root/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsbytes/runtime/WireFormatJMSBytesReferenceProvider.java
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-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsbytes/runtime/WireFormatJMSBytesReferenceProvider.java
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-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsbytes/runtime/WireFormatJMSBytesReferenceProvider.java')
-rw-r--r--branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsbytes/runtime/WireFormatJMSBytesReferenceProvider.java39
1 files changed, 23 insertions, 16 deletions
diff --git a/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsbytes/runtime/WireFormatJMSBytesReferenceProvider.java b/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsbytes/runtime/WireFormatJMSBytesReferenceProvider.java
index 00aa060ce7..de5a83bfdb 100644
--- a/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsbytes/runtime/WireFormatJMSBytesReferenceProvider.java
+++ b/branches/sca-java-1.x/modules/binding-jms-runtime/src/main/java/org/apache/tuscany/sca/binding/jms/wireformat/jmsbytes/runtime/WireFormatJMSBytesReferenceProvider.java
@@ -19,27 +19,14 @@
package org.apache.tuscany.sca.binding.jms.wireformat.jmsbytes.runtime;
-import java.util.List;
-
-import org.apache.axiom.om.OMElement;
import org.apache.tuscany.sca.assembly.Binding;
import org.apache.tuscany.sca.binding.jms.impl.JMSBinding;
import org.apache.tuscany.sca.binding.jms.impl.JMSBindingConstants;
-import org.apache.tuscany.sca.binding.jms.provider.JMSMessageProcessorUtil;
-import org.apache.tuscany.sca.binding.jms.provider.XMLTextMessageProcessor;
-import org.apache.tuscany.sca.binding.jms.wireformat.jmstextxml.WireFormatJMSTextXML;
-import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
-import org.apache.tuscany.sca.binding.ws.WebServiceBindingFactory;
-import org.apache.tuscany.sca.binding.ws.wsdlgen.BindingWSDLGenerator;
+import org.apache.tuscany.sca.binding.jms.wireformat.jmsbytes.WireFormatJMSBytes;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
-import org.apache.tuscany.sca.interfacedef.Operation;
import org.apache.tuscany.sca.invocation.Interceptor;
import org.apache.tuscany.sca.invocation.Phase;
-import org.apache.tuscany.sca.policy.PolicySet;
-import org.apache.tuscany.sca.policy.PolicySetAttachPoint;
-import org.apache.tuscany.sca.policy.util.PolicyHandler;
-import org.apache.tuscany.sca.provider.PolicyProvider;
import org.apache.tuscany.sca.provider.WireFormatProvider;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
@@ -69,8 +56,12 @@ public class WireFormatJMSBytesReferenceProvider implements WireFormatProvider {
// currently maintaining the message processor structure which
// contains the details of jms message processing however overried
// any message processors specied in the SCDL in this case
- this.binding.setRequestMessageProcessorName(JMSBindingConstants.BYTES_MP_CLASSNAME);
- this.binding.setResponseMessageProcessorName(JMSBindingConstants.BYTES_MP_CLASSNAME);
+ if (this.binding.getRequestWireFormat() instanceof WireFormatJMSBytes){
+ this.binding.setRequestMessageProcessorName(JMSBindingConstants.BYTES_MP_CLASSNAME);
+ }
+ if (this.binding.getResponseWireFormat() instanceof WireFormatJMSBytes){
+ this.binding.setResponseMessageProcessorName(JMSBindingConstants.BYTES_MP_CLASSNAME);
+ }
// just point to the reference interface contract so no
// databinding transformation takes place
@@ -80,6 +71,22 @@ public class WireFormatJMSBytesReferenceProvider implements WireFormatProvider {
public InterfaceContract getWireFormatInterfaceContract() {
return interfaceContract;
}
+
+ public InterfaceContract configureWireFormatInterfaceContract(InterfaceContract interfaceContract){
+
+ if (this.interfaceContract != null ) {
+ if (this.binding.getRequestWireFormat() instanceof WireFormatJMSBytes){
+ // set the request data transformation
+ interfaceContract.getInterface().resetInterfaceInputTypes(this.interfaceContract.getInterface());
+ }
+ if (this.binding.getResponseWireFormat() instanceof WireFormatJMSBytes){
+ // set the response data transformation
+ interfaceContract.getInterface().resetInterfaceOutputTypes(this.interfaceContract.getInterface());
+ }
+ }
+
+ return interfaceContract;
+ }
public Interceptor createInterceptor() {
return new WireFormatJMSBytesReferenceInterceptor(binding,