From d571ecabe140d9fd90505a9a8ab60ca2e0e50f35 Mon Sep 17 00:00:00 2001 From: slaws Date: Thu, 25 Aug 2011 11:48:34 +0000 Subject: 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 --- .../trunk/testing/itest/interface-matching/pom.xml | 16 +++++++++++++++- .../sca/itest/interfaces/InerfaceMatchTestCase.java | 21 +++++++++++++++++---- 2 files changed, 32 insertions(+), 5 deletions(-) (limited to 'sca-java-2.x') diff --git a/sca-java-2.x/trunk/testing/itest/interface-matching/pom.xml b/sca-java-2.x/trunk/testing/itest/interface-matching/pom.xml index 1f5940b3b8..1411792cd0 100644 --- a/sca-java-2.x/trunk/testing/itest/interface-matching/pom.xml +++ b/sca-java-2.x/trunk/testing/itest/interface-matching/pom.xml @@ -41,6 +41,20 @@ tuscany-domain-hazelcast 2.0-SNAPSHOT test - + + + + + org.apache.tuscany.sca + tuscany-binding-ws-runtime-axis2 + 2.0-SNAPSHOT + + + + org.mortbay.jetty + jetty + 6.1.19 + + 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"); -- cgit v1.2.3