tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1149101 - /tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java
Date Thu, 21 Jul 2011 10:30:21 GMT
Author: antelder
Date: Thu Jul 21 10:30:20 2011
New Revision: 1149101

URL: http://svn.apache.org/viewvc?rev=1149101&view=rev
Log:
If the getBindingInterfaceContract isn't a Java interface then try the ComponentTypeServiceInterface.
We really need a way to convert a wsdl interface into a java interface

Modified:
    tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java

Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java?rev=1149101&r1=1149100&r2=1149101&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/context/impl/ComponentContextImpl.java
Thu Jul 21 10:30:20 2011
@@ -362,7 +362,14 @@ public class ComponentContextImpl implem
         try {
             if (businessInterface == null) {
                 InterfaceContract contract = endpoint.getBindingInterfaceContract();
-                businessInterface = (Class<B>)((JavaInterface)contract.getInterface()).getJavaClass();
+                if (contract.getInterface() instanceof JavaInterface) {
+                    businessInterface = (Class<B>)((JavaInterface)contract.getInterface()).getJavaClass();
+                } else {
+                    contract = endpoint.getComponentTypeServiceInterfaceContract();
+                    if (contract.getInterface() instanceof JavaInterface) {
+                        businessInterface = (Class<B>)((JavaInterface)contract.getInterface()).getJavaClass();
+                    }
+                } 
             }
             RuntimeEndpointReference ref =
                 (RuntimeEndpointReference)createEndpointReference(endpoint, businessInterface);



Mime
View raw message