From befd009cd2be55db418737b3af1a42d3e0cc27cc Mon Sep 17 00:00:00 2001 From: antelder Date: Thu, 21 Jul 2011 10:31:50 +0000 Subject: Merge the interface fix in 1149101 to beta3 git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1149102 13f79535-47bb-0310-9956-ffa450edef68 --- .../tuscany/sca/core/context/impl/ComponentContextImpl.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sca-java-2.x/branches/2.0-Beta3/modules/core') diff --git a/sca-java-2.x/branches/2.0-Beta3/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java b/sca-java-2.x/branches/2.0-Beta3/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java index b8c205bb28..db12ed14d9 100644 --- a/sca-java-2.x/branches/2.0-Beta3/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java +++ b/sca-java-2.x/branches/2.0-Beta3/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java @@ -362,7 +362,14 @@ public class ComponentContextImpl implements RuntimeComponentContext { try { if (businessInterface == null) { InterfaceContract contract = endpoint.getBindingInterfaceContract(); - businessInterface = (Class)((JavaInterface)contract.getInterface()).getJavaClass(); + if (contract.getInterface() instanceof JavaInterface) { + businessInterface = (Class)((JavaInterface)contract.getInterface()).getJavaClass(); + } else { + contract = endpoint.getComponentTypeServiceInterfaceContract(); + if (contract.getInterface() instanceof JavaInterface) { + businessInterface = (Class)((JavaInterface)contract.getInterface()).getJavaClass(); + } + } } RuntimeEndpointReference ref = (RuntimeEndpointReference)createEndpointReference(endpoint, businessInterface); -- cgit v1.2.3