From e962b3bbdff3995b6871393755ccd070b78aa329 Mon Sep 17 00:00:00 2001 From: slaws Date: Fri, 20 Mar 2009 14:08:14 +0000 Subject: Fix to make implementation-web references work where the interface contract doesn't get set. Still looking into why endpoint broke implementation-web but this works round the problem for the time being. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@756472 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/core/assembly/impl/CompositeActivatorImpl2.java | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'java') 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)); -- cgit v1.2.3