tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmar...@apache.org
Subject svn commit: r494850 - in /incubator/tuscany/java/sca/services: bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/ bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/ bindings/binding.jms/src/main/java/org/apache...
Date Wed, 10 Jan 2007 15:21:04 GMT
Author: jmarino
Date: Wed Jan 10 07:21:03 2007
New Revision: 494850

URL: http://svn.apache.org/viewvc?view=rev&rev=494850
Log:
start refactor to allow connect process to treat atomic and composite components alike, i.e.
remove special cases for atomic components

Modified:
    incubator/tuscany/java/sca/services/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ReferenceBinding.java
    incubator/tuscany/java/sca/services/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ServiceBinding.java
    incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/CeltixReferenceBinding.java
    incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/CeltixServiceBinding.java
    incubator/tuscany/java/sca/services/bindings/binding.jms/src/main/java/org/apache/tuscany/binding/jms/JMSReferenceBinding.java
    incubator/tuscany/java/sca/services/bindings/binding.jms/src/main/java/org/apache/tuscany/binding/jms/JMSServiceBinding.java
    incubator/tuscany/java/sca/services/bindings/binding.jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/JSONRPCServiceBinding.java
    incubator/tuscany/java/sca/services/bindings/binding.rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIReferenceBinding.java
    incubator/tuscany/java/sca/services/bindings/binding.rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIServiceBinding.java
    incubator/tuscany/java/sca/services/bindings/binding.rmi/src/test/java/org/apache/tuscany/binding/rmi/RMIServiceTestCase.java
    incubator/tuscany/java/sca/services/containers/container.groovy/src/test/java/org/apache/tuscany/container/groovy/WireTestCase.java
    incubator/tuscany/java/sca/services/containers/container.javascript/src/test/java/org/apache/tuscany/container/javascript/WireTestCase.java
    incubator/tuscany/java/sca/services/containers/container.ruby/src/test/java/org/apache/tuscany/container/ruby/WireTestCase.java
    incubator/tuscany/java/sca/services/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/SpringTestUtils.java
    incubator/tuscany/java/sca/services/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/impl/ServiceInvocationTestCase.java
    incubator/tuscany/java/sca/services/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/impl/SpringCompositeBuilderTestCase.java

Modified: incubator/tuscany/java/sca/services/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ReferenceBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ReferenceBinding.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ReferenceBinding.java
(original)
+++ incubator/tuscany/java/sca/services/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ReferenceBinding.java
Wed Jan 10 07:21:03 2007
@@ -22,6 +22,8 @@
 import javax.wsdl.Definition;
 import javax.xml.namespace.QName;
 
+import static org.osoa.sca.Version.XML_NAMESPACE_1_0;
+
 import org.apache.tuscany.spi.component.CompositeComponent;
 import org.apache.tuscany.spi.component.WorkContext;
 import org.apache.tuscany.spi.extension.ReferenceBindingExtension;
@@ -46,6 +48,7 @@
  * Axis2Reference uses Axis2 to invoke a remote web service
  */
 public class Axis2ReferenceBinding<T> extends ReferenceBindingExtension {
+    private static final QName BINDING_WS = new QName(XML_NAMESPACE_1_0, "binding.ws");
 
     private WebServicePortMetaData wsPortMetaData;
     private ServiceClient serviceClient;
@@ -53,9 +56,9 @@
 
     @SuppressWarnings("unchecked")
     public Axis2ReferenceBinding(String theName,
-                          CompositeComponent parent,
-                          WebServiceBindingDefinition wsBinding,
-                          ServiceContract contract, WorkContext workContext) {
+                                 CompositeComponent parent,
+                                 WebServiceBindingDefinition wsBinding,
+                                 ServiceContract contract, WorkContext workContext) {
         super(theName, parent);
         this.workContext = workContext;
         try {
@@ -66,6 +69,10 @@
         } catch (AxisFault e) {
             throw new Axis2BindingRunTimeException(e);
         }
+    }
+
+    public QName getBindingType() {
+        return BINDING_WS;
     }
 
     public TargetInvoker createTargetInvoker(ServiceContract contract, Operation operation)
{

Modified: incubator/tuscany/java/sca/services/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ServiceBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ServiceBinding.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ServiceBinding.java
(original)
+++ incubator/tuscany/java/sca/services/bindings/binding.axis2/src/main/java/org/apache/tuscany/binding/axis2/Axis2ServiceBinding.java
Wed Jan 10 07:21:03 2007
@@ -32,6 +32,7 @@
 import javax.wsdl.PortType;
 import javax.xml.namespace.QName;
 
+import static org.osoa.sca.Version.XML_NAMESPACE_1_0;
 import org.osoa.sca.annotations.Destroy;
 
 import org.apache.tuscany.spi.builder.BuilderConfigException;
@@ -71,6 +72,8 @@
  * @version $Rev$ $Date$
  */
 public class Axis2ServiceBinding extends ServiceBindingExtension {
+    private static final QName BINDING_WS = new QName(XML_NAMESPACE_1_0, "binding.ws");
+
     private ServiceContract<?> serviceContract;
 
     private ServletHost servletHost;
@@ -288,11 +291,15 @@
             + serviceInterface.getName());
     }
 
+    public QName getBindingType() {
+        return BINDING_WS;
+    }
+
     public TargetInvoker createTargetInvoker(ServiceContract contract, org.apache.tuscany.spi.model.Operation
operation)
         throws TargetInvokerCreationException {
-        if (!operation.isCallback()){
-           throw new UnsupportedOperationException();
-        }else{
+        if (!operation.isCallback()) {
+            throw new UnsupportedOperationException();
+        } else {
             return new Axis2ServiceCallbackTargetInvoker(this);
         }
     }

Modified: incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/CeltixReferenceBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/CeltixReferenceBinding.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/CeltixReferenceBinding.java
(original)
+++ incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/CeltixReferenceBinding.java
Wed Jan 10 07:21:03 2007
@@ -21,6 +21,9 @@
 import javax.wsdl.Definition;
 import javax.wsdl.Port;
 import javax.wsdl.Service;
+import javax.xml.namespace.QName;
+
+import static org.osoa.sca.Version.XML_NAMESPACE_1_0;
 
 import org.apache.tuscany.spi.builder.BuilderException;
 import org.apache.tuscany.spi.component.CompositeComponent;
@@ -38,6 +41,7 @@
  * @version $Rev$ $Date$
  */
 public class CeltixReferenceBinding<T> extends ReferenceBindingExtension {
+    private static final QName BINDING_WS = new QName(XML_NAMESPACE_1_0, "binding.ws");
 
     private Bus bus;
     private Port port;
@@ -46,16 +50,20 @@
     private TypeHelper typeHelper;
 
     public CeltixReferenceBinding(String name,
-                           CompositeComponent parent,
-                           WebServiceBindingDefinition binding,
-                           Bus theBus,
-                           TypeHelper theTypeHelper) {
+                                  CompositeComponent parent,
+                                  WebServiceBindingDefinition binding,
+                                  Bus theBus,
+                                  TypeHelper theTypeHelper) {
         super(name, parent);
         this.wsdlDef = binding.getWSDLDefinition();
         this.port = binding.getWSDLPort();
         this.wsdlService = binding.getWSDLService();
         this.bus = theBus;
         this.typeHelper = theTypeHelper;
+    }
+
+    public QName getBindingType() {
+        return BINDING_WS;
     }
 
     public TargetInvoker createTargetInvoker(ServiceContract contract, Operation operation)
{

Modified: incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/CeltixServiceBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/CeltixServiceBinding.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/CeltixServiceBinding.java
(original)
+++ incubator/tuscany/java/sca/services/bindings/binding.celtix/src/main/java/org/apache/tuscany/binding/celtix/CeltixServiceBinding.java
Wed Jan 10 07:21:03 2007
@@ -38,6 +38,7 @@
 import javax.xml.ws.WebServiceProvider;
 
 import org.osoa.sca.annotations.Destroy;
+import static org.osoa.sca.Version.XML_NAMESPACE_1_0;
 
 import org.apache.tuscany.spi.CoreRuntimeException;
 import org.apache.tuscany.spi.component.CompositeComponent;
@@ -66,6 +67,7 @@
  * @version $Rev$ $Date$
  */
 public class CeltixServiceBinding extends ServiceBindingExtension implements ServerBindingEndpointCallback
{
+    private static final QName BINDING_WS = new QName(XML_NAMESPACE_1_0, "binding.ws");
 
     private Bus bus;
     private Port port;
@@ -272,4 +274,8 @@
         return null;
     }
 
+
+    public QName getBindingType() {
+        return BINDING_WS;
+    }
 }

Modified: incubator/tuscany/java/sca/services/bindings/binding.jms/src/main/java/org/apache/tuscany/binding/jms/JMSReferenceBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/bindings/binding.jms/src/main/java/org/apache/tuscany/binding/jms/JMSReferenceBinding.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/bindings/binding.jms/src/main/java/org/apache/tuscany/binding/jms/JMSReferenceBinding.java
(original)
+++ incubator/tuscany/java/sca/services/bindings/binding.jms/src/main/java/org/apache/tuscany/binding/jms/JMSReferenceBinding.java
Wed Jan 10 07:21:03 2007
@@ -19,6 +19,9 @@
 package org.apache.tuscany.binding.jms;
 
 import javax.jms.Destination;
+import javax.xml.namespace.QName;
+
+import static org.osoa.sca.Version.XML_NAMESPACE_1_0;
 
 import org.apache.tuscany.spi.component.CompositeComponent;
 import org.apache.tuscany.spi.extension.ReferenceBindingExtension;
@@ -30,6 +33,7 @@
  * @version $Rev: 449970 $ $Date: 2006-09-26 06:05:35 -0400 (Tue, 26 Sep 2006) $
  */
 public class JMSReferenceBinding extends ReferenceBindingExtension {
+    private static final QName BINDING_JMS = new QName(XML_NAMESPACE_1_0, "binding.jms");
 
     protected JMSBindingDefinition jmsBinding;
     protected JMSResourceFactory jmsResourceFactory;
@@ -55,6 +59,10 @@
         this.responseOperationAndDataBinding = responseOperationAndDataBinding;
         this.requestDest = requestDest;
         this.replyDest = replyDest;
+    }
+
+    public QName getBindingType() {
+        return BINDING_JMS;
     }
 
     public TargetInvoker createTargetInvoker(ServiceContract contract, Operation operation)
{

Modified: incubator/tuscany/java/sca/services/bindings/binding.jms/src/main/java/org/apache/tuscany/binding/jms/JMSServiceBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/bindings/binding.jms/src/main/java/org/apache/tuscany/binding/jms/JMSServiceBinding.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/bindings/binding.jms/src/main/java/org/apache/tuscany/binding/jms/JMSServiceBinding.java
(original)
+++ incubator/tuscany/java/sca/services/bindings/binding.jms/src/main/java/org/apache/tuscany/binding/jms/JMSServiceBinding.java
Wed Jan 10 07:21:03 2007
@@ -23,6 +23,9 @@
 import javax.jms.MessageConsumer;
 import javax.jms.Session;
 import javax.naming.NamingException;
+import javax.xml.namespace.QName;
+
+import static org.osoa.sca.Version.XML_NAMESPACE_1_0;
 
 import org.apache.tuscany.spi.component.CompositeComponent;
 import org.apache.tuscany.spi.extension.ServiceBindingExtension;
@@ -31,6 +34,7 @@
  * @version $Rev: 449970 $ $Date: 2006-09-26 06:05:35 -0400 (Tue, 26 Sep 2006) $
  */
 public class JMSServiceBinding extends ServiceBindingExtension {
+    private static final QName BINDING_JMS = new QName(XML_NAMESPACE_1_0, "binding.jms");
 
     private JMSBindingDefinition jmsBinding;
     private JMSResourceFactory jmsResourceFactory;
@@ -85,5 +89,9 @@
 
         jmsResourceFactory.startConnection();
 
+    }
+
+    public QName getBindingType() {
+        return BINDING_JMS;
     }
 }

Modified: incubator/tuscany/java/sca/services/bindings/binding.jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/JSONRPCServiceBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/bindings/binding.jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/JSONRPCServiceBinding.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/bindings/binding.jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/JSONRPCServiceBinding.java
(original)
+++ incubator/tuscany/java/sca/services/bindings/binding.jsonrpc/src/main/java/org/apache/tuscany/binding/jsonrpc/JSONRPCServiceBinding.java
Wed Jan 10 07:21:03 2007
@@ -18,6 +18,9 @@
  */
 package org.apache.tuscany.binding.jsonrpc;
 
+import javax.xml.namespace.QName;
+
+import static org.osoa.sca.Version.XML_NAMESPACE_1_0;
 import org.osoa.sca.annotations.Destroy;
 
 import org.apache.tuscany.spi.component.CompositeComponent;
@@ -29,6 +32,7 @@
  * @version $Rev$ $Date$
  */
 public class JSONRPCServiceBinding extends ServiceBindingExtension {
+    public static final QName BINDING_JSON = new QName(XML_NAMESPACE_1_0, "binding.jsonrpc");
 
     private static int servletRegistrationCount = 0;
 
@@ -38,7 +42,8 @@
 
     public static final String SCRIPT_GETTER_SERVICE_MAPPING = "/SCA/scripts";
 
-    public JSONRPCServiceBinding(String theName, CompositeComponent parent, WireService wireService,
ServletHost servletHost) {
+    public JSONRPCServiceBinding(String theName, CompositeComponent parent, WireService wireService,
+                                 ServletHost servletHost) {
 
         super(theName, parent);
 
@@ -83,4 +88,7 @@
         super.stop();
     }
 
+    public QName getBindingType() {
+        return BINDING_JSON;
+    }
 }

Modified: incubator/tuscany/java/sca/services/bindings/binding.rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIReferenceBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/bindings/binding.rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIReferenceBinding.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/bindings/binding.rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIReferenceBinding.java
(original)
+++ incubator/tuscany/java/sca/services/bindings/binding.rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIReferenceBinding.java
Wed Jan 10 07:21:03 2007
@@ -18,6 +18,8 @@
 
 import java.lang.reflect.Method;
 
+import javax.xml.namespace.QName;
+
 import org.apache.tuscany.spi.component.CompositeComponent;
 import org.apache.tuscany.spi.extension.ReferenceBindingExtension;
 import static org.apache.tuscany.spi.idl.java.JavaIDLUtils.findMethod;
@@ -31,6 +33,9 @@
  * @version $Rev$ $Date$
  */
 public class RMIReferenceBinding extends ReferenceBindingExtension {
+    private static final QName BINDING_RMI = new QName(
+        "http://tuscany.apache.org/xmlns/binding/rmi/1.0-SNAPSHOT", "binding.rmi");
+
     private final String host;
 
     private final String port;
@@ -50,6 +55,10 @@
         this.port = port;
         this.svcName = svcName;
         this.rmiHost = rmiHost;
+    }
+
+    public QName getBindingType() {
+        return BINDING_RMI;
     }
 
     public TargetInvoker createTargetInvoker(ServiceContract contract, Operation operation)
{

Modified: incubator/tuscany/java/sca/services/bindings/binding.rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIServiceBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/bindings/binding.rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIServiceBinding.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/bindings/binding.rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIServiceBinding.java
(original)
+++ incubator/tuscany/java/sca/services/bindings/binding.rmi/src/main/java/org/apache/tuscany/binding/rmi/RMIServiceBinding.java
Wed Jan 10 07:21:03 2007
@@ -19,6 +19,7 @@
 import java.lang.reflect.Method;
 import java.rmi.Remote;
 import java.rmi.server.UnicastRemoteObject;
+import javax.xml.namespace.QName;
 
 import org.apache.tuscany.spi.component.CompositeComponent;
 import org.apache.tuscany.spi.extension.ServiceBindingExtension;
@@ -35,6 +36,8 @@
  * @version $Rev$ $Date$
  */
 public class RMIServiceBinding<T extends Remote> extends ServiceBindingExtension {
+    private static final QName BINDING_RMI = new QName(
+        "http://tuscany.apache.org/xmlns/binding/rmi/1.0-SNAPSHOT", "binding.rmi");
 
     public static final String URI_PREFIX = "//localhost";
     public static final String SLASH = "/";
@@ -52,13 +55,13 @@
     private WireService wireService;
 
     public RMIServiceBinding(String name,
-                      CompositeComponent parent,
-                      WireService wireService,
-                      RMIHost rHost,
-                      String host,
-                      String port,
-                      String svcName,
-                      Class<T> service) {
+                             CompositeComponent parent,
+                             WireService wireService,
+                             RMIHost rHost,
+                             String host,
+                             String port,
+                             String svcName,
+                             Class<T> service) {
         super(name, parent);
 
         this.serviceInterface = service;
@@ -150,6 +153,10 @@
         }
         cw.visitEnd();
         return cw.toByteArray();
+    }
+
+    public QName getBindingType() {
+        return BINDING_RMI;
     }
 
     private class RMIServiceClassLoader extends ClassLoader {

Modified: incubator/tuscany/java/sca/services/bindings/binding.rmi/src/test/java/org/apache/tuscany/binding/rmi/RMIServiceTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/bindings/binding.rmi/src/test/java/org/apache/tuscany/binding/rmi/RMIServiceTestCase.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/bindings/binding.rmi/src/test/java/org/apache/tuscany/binding/rmi/RMIServiceTestCase.java
(original)
+++ incubator/tuscany/java/sca/services/bindings/binding.rmi/src/test/java/org/apache/tuscany/binding/rmi/RMIServiceTestCase.java
Wed Jan 10 07:21:03 2007
@@ -16,6 +16,8 @@
  */
 package org.apache.tuscany.binding.rmi;
 
+import javax.xml.namespace.QName;
+
 import junit.framework.TestCase;
 
 import org.apache.tuscany.binding.rmi.host.RMIHostImpl;
@@ -43,6 +45,9 @@
         WireService service = EasyMock.createNiceMock(WireService.class);
         EasyMock.replay(service);
         RMIServiceBinding s = new RMIServiceBinding("bla023", null, service, new RMIHostImpl(),
null, "9996", "bla", Runnable.class) {
+            public QName getBindingType() {
+                return null;
+            }
         };
         s.start();
         try {

Modified: incubator/tuscany/java/sca/services/containers/container.groovy/src/test/java/org/apache/tuscany/container/groovy/WireTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/containers/container.groovy/src/test/java/org/apache/tuscany/container/groovy/WireTestCase.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/containers/container.groovy/src/test/java/org/apache/tuscany/container/groovy/WireTestCase.java
(original)
+++ incubator/tuscany/java/sca/services/containers/container.groovy/src/test/java/org/apache/tuscany/container/groovy/WireTestCase.java
Wed Jan 10 07:21:03 2007
@@ -41,8 +41,8 @@
 import junit.framework.TestCase;
 import org.apache.tuscany.container.groovy.mock.Greeting;
 import org.apache.tuscany.test.ArtifactFactory;
-import static org.apache.tuscany.test.ArtifactFactory.createInboundWire;
-import static org.apache.tuscany.test.ArtifactFactory.createOutboundWire;
+import static org.apache.tuscany.test.ArtifactFactory.createLocalInboundWire;
+import static org.apache.tuscany.test.ArtifactFactory.createLocalOutboundWire;
 import static org.apache.tuscany.test.ArtifactFactory.createWireService;
 import static org.apache.tuscany.test.ArtifactFactory.terminateWire;
 import static org.easymock.EasyMock.createMock;
@@ -61,27 +61,25 @@
  */
 public class WireTestCase extends TestCase {
 
-    private static final String SCRIPT = "import org.apache.tuscany.container.groovy.mock.Greeting;\n"
-        + "class Foo implements Greeting{\n"
-        + "   Greeting wire;\n"
-        + "   \n"
-        + "   String setWire(Greeting ref){\n"
-        + "       wire = ref;\n"
-        + "   };\n"
-        + "   \n"
-        + "   String greet(String name){\n"
-        + "       return wire.greet(name);\n"
-        + "   };\n"
-        + "}\n";
+    private static final String SCRIPT = "import org.apache.tuscany.container.groovy.mock.Greeting;"
+        + "class Foo implements Greeting{"
+        + "   Greeting wire;"
+        + "   "
+        + "   void setWire(Greeting ref){"
+        + "       wire = ref;"
+        + "   };"
+        + "   "
+        + "   String greet(String name){"
+        + "       return wire.greet(name);  "
+        + "   };"
+        + "}";
 
     private static final String SCRIPT2 = "import org.apache.tuscany.container.groovy.mock.Greeting;"
-        + "class Foo implements Greeting {\n"
-        + "   public String greet(String name){\n"
-        + "       return name;\n"
-        + "   }\n"
-        + "   String setWire(Greeting ref){\n"
-        + "   };\n"
-        + "}\n";
+        + "class Foo implements Greeting{"
+        + "   public String greet(String name){"
+        + "       return name;  "
+        + "   }"
+        + "}";
 
     private Class<? extends GroovyObject> implClass1;
     private Class<? extends GroovyObject> implClass2;
@@ -101,7 +99,7 @@
         configuration.setWireService(createWireService());
         GroovyAtomicComponent component = new GroovyAtomicComponent(configuration);
         component.setScopeContainer(scopeContainer);
-        OutboundWire wire = createOutboundWire("wire", Greeting.class);
+        OutboundWire wire = createLocalOutboundWire("wire", Greeting.class);
         terminateWire(wire);
 
         TargetInvoker invoker = createMock(TargetInvoker.class);
@@ -171,7 +169,7 @@
         configuration.setWireService(createWireService());
         GroovyAtomicComponent component = new GroovyAtomicComponent(configuration);
         component.setScopeContainer(scopeContainer);
-        InboundWire wire = createInboundWire("Greeting", Greeting.class);
+        InboundWire wire = createLocalInboundWire("Greeting", Greeting.class);
         terminateWire(wire);
         for (InboundInvocationChain chain : wire.getInvocationChains().values()) {
             chain.setTargetInvoker(component.createTargetInvoker(null, chain.getOperation(),
null));

Modified: incubator/tuscany/java/sca/services/containers/container.javascript/src/test/java/org/apache/tuscany/container/javascript/WireTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/containers/container.javascript/src/test/java/org/apache/tuscany/container/javascript/WireTestCase.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/containers/container.javascript/src/test/java/org/apache/tuscany/container/javascript/WireTestCase.java
(original)
+++ incubator/tuscany/java/sca/services/containers/container.javascript/src/test/java/org/apache/tuscany/container/javascript/WireTestCase.java
Wed Jan 10 07:21:03 2007
@@ -146,7 +146,7 @@
         context.setScopeContainer(scope);
         scope.register(context);
 
-        InboundWire wire = ArtifactFactory.createInboundWire("Greeting", Greeting.class);
+        InboundWire wire = ArtifactFactory.createLocalInboundWire("Greeting", Greeting.class);
         ArtifactFactory.terminateWire(wire);
         for (InboundInvocationChain chain : wire.getInvocationChains().values()) {
             chain.setTargetInvoker(context.createTargetInvoker(null, chain.getOperation(),
null));

Modified: incubator/tuscany/java/sca/services/containers/container.ruby/src/test/java/org/apache/tuscany/container/ruby/WireTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/containers/container.ruby/src/test/java/org/apache/tuscany/container/ruby/WireTestCase.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/containers/container.ruby/src/test/java/org/apache/tuscany/container/ruby/WireTestCase.java
(original)
+++ incubator/tuscany/java/sca/services/containers/container.ruby/src/test/java/org/apache/tuscany/container/ruby/WireTestCase.java
Wed Jan 10 07:21:03 2007
@@ -161,7 +161,7 @@
         context.setScopeContainer(scope);
         scope.register(context);
 
-        InboundWire wire = ArtifactFactory.createInboundWire("Greeting",
+        InboundWire wire = ArtifactFactory.createLocalInboundWire("Greeting",
             Greeting.class);
         ArtifactFactory.terminateWire(wire);
         for (InboundInvocationChain chain : wire.getInvocationChains().values()) {

Modified: incubator/tuscany/java/sca/services/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/SpringTestUtils.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/SpringTestUtils.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/SpringTestUtils.java
(original)
+++ incubator/tuscany/java/sca/services/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/SpringTestUtils.java
Wed Jan 10 07:21:03 2007
@@ -18,6 +18,8 @@
  */
 package org.apache.tuscany.container.spring;
 
+import javax.xml.namespace.QName;
+
 import org.apache.tuscany.spi.QualifiedName;
 import org.apache.tuscany.spi.builder.Connector;
 import org.apache.tuscany.spi.builder.WiringException;
@@ -47,9 +49,12 @@
                                                    CompositeComponent parent)
         throws InvalidServiceContractException, WiringException {
         ServiceBinding serviceBinding = new ServiceBindingExtension(name, parent) {
+            public QName getBindingType() {
+                return null;
+            }
         };
-        InboundWire inboundWire = ArtifactFactory.createInboundWire(name, serviceInterface);
-        OutboundWire outboundWire = ArtifactFactory.createOutboundWire(name, serviceInterface);
+        InboundWire inboundWire = ArtifactFactory.createLocalInboundWire(name, serviceInterface);
+        OutboundWire outboundWire = ArtifactFactory.createLocalOutboundWire(name, serviceInterface);
         ArtifactFactory.terminateWire(outboundWire);
         serviceBinding.setInboundWire(inboundWire);
         serviceBinding.setOutboundWire(outboundWire);

Modified: incubator/tuscany/java/sca/services/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/impl/ServiceInvocationTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/impl/ServiceInvocationTestCase.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/impl/ServiceInvocationTestCase.java
(original)
+++ incubator/tuscany/java/sca/services/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/impl/ServiceInvocationTestCase.java
Wed Jan 10 07:21:03 2007
@@ -18,6 +18,8 @@
  */
 package org.apache.tuscany.container.spring.impl;
 
+import javax.xml.namespace.QName;
+
 import org.apache.tuscany.spi.QualifiedName;
 import org.apache.tuscany.spi.builder.Connector;
 import org.apache.tuscany.spi.component.Service;
@@ -47,12 +49,15 @@
     public void testInvocation() throws Exception {
         AbstractApplicationContext springContext = createSpringContext();
         SpringCompositeComponent composite = new SpringCompositeComponent("parent", springContext,
null, null, null);
-        InboundWire inboundWire = ArtifactFactory.createInboundWire("fooService", TestBean.class);
-        OutboundWire outboundWire = ArtifactFactory.createOutboundWire("fooService", TestBean.class);
+        InboundWire inboundWire = ArtifactFactory.createLocalInboundWire("fooService", TestBean.class);
+        OutboundWire outboundWire = ArtifactFactory.createLocalOutboundWire("fooService",
TestBean.class);
         outboundWire.setTargetName(new QualifiedName("foo"));
         ArtifactFactory.terminateWire(outboundWire);
         ServiceBinding serviceBinding =
             new ServiceBindingExtension("fooService", composite) {
+                public QName getBindingType() {
+                    return null;
+                }
             };
 
         serviceBinding.setInboundWire(inboundWire);

Modified: incubator/tuscany/java/sca/services/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/impl/SpringCompositeBuilderTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/services/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/impl/SpringCompositeBuilderTestCase.java?view=diff&rev=494850&r1=494849&r2=494850
==============================================================================
--- incubator/tuscany/java/sca/services/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/impl/SpringCompositeBuilderTestCase.java
(original)
+++ incubator/tuscany/java/sca/services/containers/container.spring/src/test/java/org/apache/tuscany/container/spring/impl/SpringCompositeBuilderTestCase.java
Wed Jan 10 07:21:03 2007
@@ -22,11 +22,12 @@
 import java.net.URISyntaxException;
 import java.net.URL;
 
+import javax.xml.namespace.QName;
+
 import org.apache.tuscany.spi.builder.BuilderRegistry;
 import org.apache.tuscany.spi.builder.Connector;
 import org.apache.tuscany.spi.component.CompositeComponent;
 import org.apache.tuscany.spi.component.Service;
-import org.apache.tuscany.spi.component.ServiceBinding;
 import org.apache.tuscany.spi.deployer.DeploymentContext;
 import org.apache.tuscany.spi.extension.ServiceBindingExtension;
 import org.apache.tuscany.spi.model.BoundServiceDefinition;
@@ -67,9 +68,12 @@
         WireService wireService = ArtifactFactory.createWireService();
         ServiceBindingExtension binding =
             new ServiceBindingExtension("fooServiceBinding", null) {
+                public QName getBindingType() {
+                    return null;
+                }
             };
-        InboundWire inboundWire = ArtifactFactory.createInboundWire("fooServiceBinding",
TestBean.class);
-        OutboundWire outboundWire = ArtifactFactory.createOutboundWire("fooServiceBinding",
TestBean.class);
+        InboundWire inboundWire = ArtifactFactory.createLocalInboundWire("fooServiceBinding",
TestBean.class);
+        OutboundWire outboundWire = ArtifactFactory.createLocalOutboundWire("fooServiceBinding",
TestBean.class);
         ArtifactFactory.terminateWire(outboundWire);
         binding.setInboundWire(inboundWire);
         binding.setOutboundWire(outboundWire);



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message