From 280be43f828c522abd5ceef38e953ed0d71f6ad8 Mon Sep 17 00:00:00 2001 From: slaws Date: Wed, 3 Feb 2010 19:04:11 +0000 Subject: 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 --- .../sca/binding/ws/axis2/WSDLBindingTestCase.java | 52 ++++++++++++++++++++++ .../binding/ws/axis2/WSDLBindingURITestCase.java | 52 ++++++++++++++++++++++ .../binding/ws/axis2/WSDLBindingWSATestCase.java | 52 ++++++++++++++++++++++ .../ws/axis2/helloworld/helloworld.composite | 4 +- .../binding/ws/axis2/helloworld/helloworld.wsdl | 4 +- .../ws/axis2/wsdlbinding/helloworld.composite | 41 +++++++++++++++++ .../ws/axis2/wsdlbindinguri/helloworld.composite | 42 +++++++++++++++++ .../ws/axis2/wsdlbindingwsa/helloworld.composite | 45 +++++++++++++++++++ 8 files changed, 288 insertions(+), 4 deletions(-) create mode 100644 sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLBindingTestCase.java create mode 100644 sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLBindingURITestCase.java create mode 100644 sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/WSDLBindingWSATestCase.java create mode 100644 sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlbinding/helloworld.composite create mode 100644 sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlbindinguri/helloworld.composite create mode 100644 sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test/resources/org/apache/tuscany/sca/binding/ws/axis2/wsdlbindingwsa/helloworld.composite (limited to 'sca-java-2.x/trunk/modules/binding-ws-runtime-axis2/src/test') 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 @@ - + @@ -36,7 +36,7 @@ - http://localhost:8085/services/HelloWorldWebService + http://localhost:8085/services/HelloWorldWebService1 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 @@ - - + + 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 @@ + + + + + + + + + + + + + + + + + + + + + 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 @@ + + + + + + + + + + + + + + + + + + + + + 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 @@ + + + + + + + + + + + + + + + + + + + http://localhost:8085/services/HelloWorldWebService1 + + + + + + -- cgit v1.2.3