summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-02-03 19:04:11 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-02-03 19:04:11 +0000
commit280be43f828c522abd5ceef38e953ed0d71f6ad8 (patch)
tree9e43de79f6bdcd132b34f10d9a602d83d8abccf3
parent4ab8cdc06e5a973e2d95684204aaa35cded66891 (diff)
As some more basic tests around the different ways that endpoint uri can be specified
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@906176 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLBindingTestCase.java52
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLBindingURITestCase.java52
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLBindingWSATestCase.java52
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite4
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl4
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlbinding/helloworld.composite41
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlbindinguri/helloworld.composite42
-rw-r--r--sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlbindingwsa/helloworld.composite45
8 files changed, 288 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLBindingTestCase.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLBindingTestCase.java
new file mode 100644
index 0000000000..4882da594f
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLBindingTestCase.java
@@ -0,0 +1,52 @@
+/*
+ * 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
+ * "License"); you may not use this file except in compliance
+ * 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.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorld;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public class WSDLBindingTestCase extends TestCase {
+
+ private Node node;
+ private HelloWorld helloWorld;
+
+ public void testCalculator() throws Exception {
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/wsdlbinding/helloworld.composite",
+ new Contribution("test", "target/test-classes"));
+ node.start();
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldClient");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+}
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLBindingURITestCase.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLBindingURITestCase.java
new file mode 100644
index 0000000000..806a6b6fba
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLBindingURITestCase.java
@@ -0,0 +1,52 @@
+/*
+ * 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
+ * "License"); you may not use this file except in compliance
+ * 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.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorld;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public class WSDLBindingURITestCase extends TestCase {
+
+ private Node node;
+ private HelloWorld helloWorld;
+
+ public void testCalculator() throws Exception {
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/wsdlbindinguri/helloworld.composite",
+ new Contribution("test", "target/test-classes"));
+ node.start();
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldClient");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+}
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLBindingWSATestCase.java b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLBindingWSATestCase.java
new file mode 100644
index 0000000000..3e8ee0c486
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLBindingWSATestCase.java
@@ -0,0 +1,52 @@
+/*
+ * 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
+ * "License"); you may not use this file except in compliance
+ * 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.
+ */
+
+package org.apache.tuscany.sca.binding.ws.axis2;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorld;
+import org.apache.tuscany.sca.node.Contribution;
+import org.apache.tuscany.sca.node.Node;
+import org.apache.tuscany.sca.node.NodeFactory;
+
+public class WSDLBindingWSATestCase extends TestCase {
+
+ private Node node;
+ private HelloWorld helloWorld;
+
+ public void testCalculator() throws Exception {
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/wsdlbindingwsa/helloworld.composite",
+ new Contribution("test", "target/test-classes"));
+ node.start();
+ helloWorld = node.getService(HelloWorld.class, "HelloWorldClient");
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ node.stop();
+ node.destroy();
+ }
+
+}
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite
index a6cd20a678..fdbb68baea 100644
--- a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite
+++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.composite
@@ -26,7 +26,7 @@
<implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldClient"/>
<reference name="helloWorldWS">
<interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
- <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)"/>
+ <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort1)"/>
</reference>
</component>
@@ -36,7 +36,7 @@
<interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
<binding.ws wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapBinding)">
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
- <wsa:Address>http://localhost:8085/services/HelloWorldWebService</wsa:Address>
+ <wsa:Address>http://localhost:8085/services/HelloWorldWebService1</wsa:Address>
</wsa:EndpointReference>
</binding.ws>
</service>
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl
index 1a2272d7ee..0d5fd064ae 100644
--- a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl
+++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/helloworld/helloworld.wsdl
@@ -72,8 +72,8 @@
</wsdl:binding>
<wsdl:service name="HelloWorldService">
- <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort">
- <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService"/>
+ <wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort1">
+ <wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService1"/>
</wsdl:port>
<wsdl:port binding="tns:HelloWorldSoapBinding" name="HelloWorldSoapPort2">
<wsdlsoap:address location="http://localhost:8085/services/HelloWorldWebService2"/>
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlbinding/helloworld.composite b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlbinding/helloworld.composite
new file mode 100644
index 0000000000..863d13b97e
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlbinding/helloworld.composite
@@ -0,0 +1,41 @@
+<?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
+ * "License"); you may not use this file except in compliance
+ * 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:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="wsdlbinding">
+
+ <component name="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldClient"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="http://localhost:8080/HelloWorldService/HelloWorld"/>
+ </reference>
+ </component>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldService"/>
+ <service name="HelloWorld">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapBinding)"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlbindinguri/helloworld.composite b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlbindinguri/helloworld.composite
new file mode 100644
index 0000000000..a877f9be26
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlbindinguri/helloworld.composite
@@ -0,0 +1,42 @@
+<?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
+ * "License"); you may not use this file except in compliance
+ * 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:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="wsdlbindinguri">
+
+ <component name="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldClient"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort1)"/>
+ </reference>
+ </component>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldService"/>
+ <service name="HelloWorld">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws uri="http://localhost:8085/services/HelloWorldWebService1"
+ wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapBinding)"/>
+ </service>
+ </component>
+
+</composite>
diff --git a/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlbindingwsa/helloworld.composite b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlbindingwsa/helloworld.composite
new file mode 100644
index 0000000000..7b0263b019
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlbindingwsa/helloworld.composite
@@ -0,0 +1,45 @@
+<?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
+ * "License"); you may not use this file except in compliance
+ * 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:sca="http://docs.oasis-open.org/ns/opencsa/sca/200912"
+ targetNamespace="http://www.tuscany.apache.org/tests/binding/ws/axis2"
+ name="wsdlbindingwsa">
+
+ <component name="HelloWorldClient">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldClient"/>
+ <reference name="helloWorldWS">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort1)"/>
+ </reference>
+ </component>
+
+ <component name="HelloWorldService">
+ <implementation.java class="org.apache.tuscany.sca.binding.ws.axis2.helloworld.HelloWorldService"/>
+ <service name="HelloWorld">
+ <interface.wsdl interface="http://helloworld#wsdl.interface(HelloWorld)" />
+ <binding.ws wsdlElement="http://helloworld#wsdl.binding(HelloWorldSoapBinding)">
+ <wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ <wsa:Address>http://localhost:8085/services/HelloWorldWebService1</wsa:Address>
+ </wsa:EndpointReference>
+ </binding.ws>
+ </service>
+ </component>
+
+</composite>