summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java
index 309729d0f0..f36c0ce301 100644
--- a/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java
+++ b/java/sca/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java
@@ -758,6 +758,14 @@ public class CompositeActivatorImpl2 implements CompositeActivator {
} else {
sourceContract = componentTypeRef.getInterfaceContract();
}
+
+ // TODO - EPR - interface contract seems to be null in the implementation.web
+ // case. Not introspecting the CT properly?
+ if (sourceContract == null){
+ // take the contract from the service to which the reference is connected
+ sourceContract = endpointReference.getTargetEndpoint().getInterfaceContract();
+ reference.setInterfaceContract(sourceContract);
+ }
endpointReference.setInterfaceContract(sourceContract.makeUnidirectional(false));