summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/testing
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-01-26 10:24:43 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2012-01-26 10:24:43 +0000
commit12034483696479a360d0f0f0ad6b9ed7f30d8413 (patch)
tree423377318732cdf210fea1b3c95c573dc45e98d6 /sca-java-2.x/trunk/testing
parent500df32134a8b61a56326e7527924f8339a4192e (diff)
TUSCANY-3800, TUSCANY-3283, TUSCANY-3298 - more wsdlgen updates from 1.x.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1236129 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/testing')
-rw-r--r--sca-java-2.x/trunk/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedClient.composite29
-rw-r--r--sca-java-2.x/trunk/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedService.composite30
-rw-r--r--sca-java-2.x/trunk/testing/itest/interface-matching/src/test/java/org/apache/tuscany/sca/itest/interfaces/InerfaceMatchTestCase.java48
-rw-r--r--sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/main/java/datatypes/impl/GetDataServiceWithoutExceptionImpl.java2
-rw-r--r--sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/main/resources/helloworld.composite6
-rw-r--r--sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/test/java/datatypes/DataTypesTestCase.java2
-rw-r--r--sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/test/java/datatypes/DynamicSDOTestCase.java2
-rw-r--r--sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/test/java/helloworld/WSDLGenTestCase.java7
8 files changed, 119 insertions, 7 deletions
diff --git a/sca-java-2.x/trunk/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedClient.composite b/sca-java-2.x/trunk/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedClient.composite
new file mode 100644
index 0000000000..44074bf719
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedClient.composite
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MatchWSDistributedClient" >
+
+ <component name="DistributedClientComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ClientComponentImpl" />
+ <reference name="aCallBackService" target="DistributedServiceComponent" />
+ </component>
+
+</composite> \ No newline at end of file
diff --git a/sca-java-2.x/trunk/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedService.composite b/sca-java-2.x/trunk/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedService.composite
new file mode 100644
index 0000000000..981f5d172c
--- /dev/null
+++ b/sca-java-2.x/trunk/testing/itest/interface-matching/src/main/resources/org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedService.composite
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+-->
+<composite xmlns="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ xmlns:foo="http://foo" targetNamespace="http://foo"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ name="MatchWSDistributedService" >
+
+ <component name="DistributedServiceComponent">
+ <implementation.java class="org.apache.tuscany.sca.itest.interfaces.ServiceComponentImpl" />
+ <service name="ServiceComponent">
+ <binding.ws/>
+ </service>
+ </component>
+</composite> \ No newline at end of file
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 f4d5f009ed..28b1bc442f 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
@@ -208,5 +208,53 @@ public class InerfaceMatchTestCase {
node1.stop();
node2.stop();
+ }
+
+ /**
+ * Remotable client and service interfaces where the interfaces match.
+ * Components running in the separate composite/JVM, i.e. there is a remote registry
+ * and with binding.ws explicitly configured at the service
+ *
+ * @throws Exception
+ */
+ @Test
+ public void testWSDistributedRemotable() throws Exception {
+
+
+ String [] contributions = {"./target/classes"};
+ Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedClient.composite",
+ contributions);
+ node1.start();
+
+ Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
+ "org/apache/tuscany/sca/itest/interfaces/match/distributed/MatchWSDistributedService.composite",
+ contributions);
+
+ // force 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");
+ ParameterObject po = new ParameterObject();
+
+ try {
+ String response = local.foo1(po);
+ Assert.assertEquals("AComponent", response);
+ } catch (ServiceRuntimeException ex){
+ Assert.fail("Unexpected exception with foo " + ex.toString());
+ }
+
+ try {
+ local.callback("Callback");
+ String response = local.getCallbackValue();
+ Assert.assertEquals("Callback", response);
+ } catch (ServiceRuntimeException ex){
+ Assert.fail("Unexpected exception with callback" + ex.toString());
+ }
+
+ node1.stop();
+ node2.stop();
}
}
diff --git a/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/main/java/datatypes/impl/GetDataServiceWithoutExceptionImpl.java b/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/main/java/datatypes/impl/GetDataServiceWithoutExceptionImpl.java
index 3b597e9e8e..d28df3fbdd 100644
--- a/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/main/java/datatypes/impl/GetDataServiceWithoutExceptionImpl.java
+++ b/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/main/java/datatypes/impl/GetDataServiceWithoutExceptionImpl.java
@@ -37,7 +37,7 @@ public class GetDataServiceWithoutExceptionImpl implements GetDataServiceWithout
public DataObject getMessageSDO(String paramString) {
return null;
}
-
+
public List<DataObject> getMessageListSDOList(String paramString) {
return null;
}
diff --git a/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/main/resources/helloworld.composite b/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/main/resources/helloworld.composite
index 0f668613d9..52b957d4a6 100644
--- a/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/main/resources/helloworld.composite
+++ b/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/main/resources/helloworld.composite
@@ -27,7 +27,7 @@
<implementation.java class="helloworld.HelloWorldClientImpl" />
<service name="HelloWorldService">
<binding.sca/>
- </service>
+ </service>
<reference name="hwService">
<binding.ws uri="http://localhost:8085/HelloWorldServiceComponent"/>
</reference>
@@ -45,13 +45,11 @@
gen'd WSDL by setting the service interface to the RI WSDL. Tuscany should
generate a WSDL for the component and compare the two for compatibility
-->
-<!--
<component name="HelloWorldServiceCompatibilityComponent">
<implementation.java class="helloworld.HelloWorldImpl" />
<service name="HelloWorldService">
<interface.wsdl interface="http://helloworld/#wsdl.interface(HelloWorldImpl)"/>
- <binding.ws uri="http://localhost:8085/HelloWorldServiceComponent"/>
+ <binding.ws uri="http://localhost:8085/HelloWorldServiceCompatibilityComponent"/>
</service>
</component>
- -->
</composite>
diff --git a/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/test/java/datatypes/DataTypesTestCase.java b/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/test/java/datatypes/DataTypesTestCase.java
index 7132e6a77e..75a4c300b4 100644
--- a/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/test/java/datatypes/DataTypesTestCase.java
+++ b/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/test/java/datatypes/DataTypesTestCase.java
@@ -31,7 +31,7 @@ import static org.junit.Assert.assertEquals;
*
* @version $Rev: 814373 $ $Date: 2009-09-13 19:06:29 +0100 (Sun, 13 Sep 2009) $
*/
-@Ignore("In the process of porting from 1.x")
+//@Ignore("In the process of porting from 1.x")
public class DataTypesTestCase extends BaseFramework {
@Test
diff --git a/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/test/java/datatypes/DynamicSDOTestCase.java b/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/test/java/datatypes/DynamicSDOTestCase.java
index 4a621c7498..1254d147ee 100644
--- a/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/test/java/datatypes/DynamicSDOTestCase.java
+++ b/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/test/java/datatypes/DynamicSDOTestCase.java
@@ -31,7 +31,7 @@ import static org.junit.Assert.assertEquals;
*
* @version $Rev: 814373 $ $Date: 2009-09-13 19:06:29 +0100 (Sun, 13 Sep 2009) $
*/
-@Ignore("In the process of porting from 1.x")
+//@Ignore("In the process of porting from 1.x")
public class DynamicSDOTestCase extends BaseFramework {
@Test
diff --git a/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/test/java/helloworld/WSDLGenTestCase.java b/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/test/java/helloworld/WSDLGenTestCase.java
index 6fb6d89068..7fabf4cc92 100644
--- a/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/test/java/helloworld/WSDLGenTestCase.java
+++ b/sca-java-2.x/trunk/testing/itest/ws/wsdlgen/src/test/java/helloworld/WSDLGenTestCase.java
@@ -86,6 +86,13 @@ public class WSDLGenTestCase{
abean.setField3(bbean);
assertEquals("Hello Hello 3 4 1 2", helloWorldClient.getGreetingsDBean(abean));
+
+ try {
+ helloWorldClient.getGreetingsException("Fred");
+ fail("exception not returned");
+ } catch(Exception ex) {
+
+ }
}
@Test