diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-25 11:48:34 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2011-08-25 11:48:34 +0000 |
commit | d571ecabe140d9fd90505a9a8ab60ca2e0e50f35 (patch) | |
tree | 0608ee1fa5f3b3f5fa305c89ceac4389ca72d7a0 /sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache | |
parent | e7e31fc577cdbbc1a3da2c254daba6aec2a4b272 (diff) |
Configure the default binding to use binding.ws in the remote case rather than binding.hazelcast as the latter doesn't support callbacks
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1161522 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache')
-rw-r--r-- | sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMatchTestCase.java | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMatchTestCase.java b/sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMatchTestCase.java index ac1bc5c5ff..1864a8139d 100644 --- a/sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMatchTestCase.java +++ b/sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMatchTestCase.java @@ -20,11 +20,18 @@ package org.apache.tuscany.sca.itest.interfaces;
import java.net.URI;
+import java.util.List;
+
+import javax.xml.namespace.QName;
import junit.framework.Assert;
+import org.apache.tuscany.sca.assembly.SCABinding;
+import org.apache.tuscany.sca.binding.ws.WebServiceBinding;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.NodeFactory;
+import org.apache.tuscany.sca.node.configuration.BindingConfiguration;
+import org.apache.tuscany.sca.node.impl.NodeImpl;
import org.junit.Ignore;
import org.junit.Test;
import org.oasisopen.sca.ServiceRuntimeException;
@@ -40,7 +47,7 @@ public class InerfaceMatchTestCase { @Test
public void testLocal() throws Exception {
String [] contributions = {"./target/classes"};
- Node node1 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
"org/apache/tuscany/sca/itest/interfaces/missmatch/local/MatchLocal.composite",
contributions);
node1.start();
@@ -64,19 +71,25 @@ public class InerfaceMatchTestCase { *
* @throws Exception
*/
- @Ignore("Remote interface matching doesn't take callback into account yet")
@Test
public void testDistributedRemotable() throws Exception {
+ // Force the remote default binding to be web services
+ System.setProperty("org.apache.tuscany.sca.binding.sca.provider.SCABindingMapper.mappedBinding",
+ "{http://docs.oasis-open.org/ns/opencsa/sca/200912}binding.ws");
+
String [] contributions = {"./target/classes"};
- Node node1 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
"org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchDistributedClient.composite",
contributions);
node1.start();
- Node node2 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
+ Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
"org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MatchDistributedService.composite",
contributions);
+ // for default binding on node2 to use a different port from node 1(which will default to 8080
+ ((NodeImpl)node2).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8081/");
+ ((NodeImpl)node2).getConfiguration().addBinding(SCABinding.TYPE, "http://localhost:8081/");
node2.start();
ClientComponent local = node1.getService(ClientComponent.class, "DistributedClientComponent");
|