summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests')
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorld.java29
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldComponent.java33
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldMultiService.java51
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOM.java30
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOM2.java30
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOMComponent.java34
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOMService.java40
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOMTestCase.java56
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldService.java28
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldTestCaseFIXME.java44
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/QuestionMarkWSDLTestCaseFIXME.java100
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java62
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/DefaultMultiServiceTestCase.java24
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/DefaultSingleServiceTestCase.java24
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/WSDLExplicitURITestCase.java24
-rw-r--r--sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/WSDLRelativeURITestCase.java24
16 files changed, 633 insertions, 0 deletions
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorld.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorld.java
new file mode 100644
index 0000000000..dfc78e7cd8
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorld.java
@@ -0,0 +1,29 @@
+/*
+ * 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.axis2.itests;
+
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface HelloWorld {
+
+ public String getGreetings(String s);
+
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldComponent.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldComponent.java
new file mode 100644
index 0000000000..3978726f2a
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldComponent.java
@@ -0,0 +1,33 @@
+/*
+ * 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.axis2.itests;
+
+import org.osoa.sca.annotations.Reference;
+
+public class HelloWorldComponent implements HelloWorld {
+
+ @Reference
+ public HelloWorld helloWorldWS;
+
+ public String getGreetings(String s) {
+ return helloWorldWS.getGreetings(s);
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldMultiService.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldMultiService.java
new file mode 100644
index 0000000000..8c1120f545
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldMultiService.java
@@ -0,0 +1,51 @@
+/*
+ * 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.axis2.itests;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+
+public class HelloWorldMultiService implements HelloWorldOM, HelloWorldOM2 {
+
+ public OMElement getGreetings(OMElement requestOM) {
+ String name = requestOM.getFirstElement().getText();
+
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement responseOM = omFactory.createOMElement("getGreetingsResponse", "http://helloworld-om", "helloworld");
+ OMElement param = omFactory.createOMElement("getGreetingsReturn", "http://helloworld-om", "helloworld");
+ responseOM.addChild(param);
+ param.addChild(omFactory.createOMText("Hello " + name));
+
+ return responseOM;
+ }
+
+ public OMElement getGreetings2(OMElement requestOM) {
+ String name = requestOM.getFirstElement().getText();
+
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement responseOM = omFactory.createOMElement("getGreetingsResponse", "http://helloworld-om", "helloworld");
+ OMElement param = omFactory.createOMElement("getGreetingsReturn", "http://helloworld-om", "helloworld");
+ responseOM.addChild(param);
+ param.addChild(omFactory.createOMText("Hello2 " + name));
+
+ return responseOM;
+ }
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOM.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOM.java
new file mode 100644
index 0000000000..897ac8dcb9
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOM.java
@@ -0,0 +1,30 @@
+/*
+ * 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.axis2.itests;
+
+import org.apache.axiom.om.OMElement;
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface HelloWorldOM {
+
+ public OMElement getGreetings(OMElement parmE);
+
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOM2.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOM2.java
new file mode 100644
index 0000000000..8981541ad8
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOM2.java
@@ -0,0 +1,30 @@
+/*
+ * 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.axis2.itests;
+
+import org.apache.axiom.om.OMElement;
+import org.osoa.sca.annotations.Remotable;
+
+@Remotable
+public interface HelloWorldOM2 {
+
+ public OMElement getGreetings2(OMElement parmE);
+
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOMComponent.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOMComponent.java
new file mode 100644
index 0000000000..6b6abb843f
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOMComponent.java
@@ -0,0 +1,34 @@
+/*
+ * 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.axis2.itests;
+
+import org.apache.axiom.om.OMElement;
+import org.osoa.sca.annotations.Reference;
+
+public class HelloWorldOMComponent implements HelloWorldOM {
+
+ @Reference
+ public HelloWorldOM helloWorldWS;
+
+ public OMElement getGreetings(OMElement om) {
+ return helloWorldWS.getGreetings(om);
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOMService.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOMService.java
new file mode 100644
index 0000000000..861509c003
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOMService.java
@@ -0,0 +1,40 @@
+/*
+ * 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.axis2.itests;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+
+public class HelloWorldOMService implements HelloWorldOM {
+
+ public OMElement getGreetings(OMElement requestOM) {
+ String name = requestOM.getFirstElement().getText();
+
+ OMFactory omFactory = OMAbstractFactory.getOMFactory();
+ OMElement responseOM = omFactory.createOMElement("getGreetingsResponse", "http://helloworld-om", "helloworld");
+ OMElement param = omFactory.createOMElement("getGreetingsReturn", "http://helloworld-om", "helloworld");
+ responseOM.addChild(param);
+ param.addChild(omFactory.createOMText("Hello " + name));
+
+ return responseOM;
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOMTestCase.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOMTestCase.java
new file mode 100644
index 0000000000..40aa0e4480
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldOMTestCase.java
@@ -0,0 +1,56 @@
+/*
+ * 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.axis2.itests;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMText;
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+public class HelloWorldOMTestCase extends TestCase {
+
+ private SCADomain domain;
+ private HelloWorldOM helloWorld;
+
+ public void testCalculator() throws Exception {
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
+ OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
+ requestOM.addChild(parmE);
+ parmE.addChild(fac.createOMText("petra"));
+ OMElement responseOM = helloWorld.getGreetings(requestOM);
+ OMElement child = (OMElement)responseOM.getFirstElement();
+ Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
+ }
+
+ protected void setUp() throws Exception {
+ domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/axis2/itests/helloworld-om.composite");
+ helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldComponent");
+ }
+
+ protected void tearDown() throws Exception {
+ domain.close();
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldService.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldService.java
new file mode 100644
index 0000000000..d7d6b93f34
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldService.java
@@ -0,0 +1,28 @@
+/*
+ * 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.axis2.itests;
+
+public class HelloWorldService implements HelloWorld {
+
+ public String getGreetings(String s) {
+ return "Hello " + s;
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldTestCaseFIXME.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldTestCaseFIXME.java
new file mode 100644
index 0000000000..ee42e8cb5f
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/HelloWorldTestCaseFIXME.java
@@ -0,0 +1,44 @@
+/*
+ * 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.axis2.itests;
+
+import junit.framework.TestCase;
+
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+public class HelloWorldTestCaseFIXME extends TestCase {
+
+ private SCADomain domain;
+ private HelloWorld helloWorld;
+
+ public void testCalculator() throws Exception {
+ assertEquals("Hello petra", helloWorld.getGreetings("petra"));
+ }
+
+ protected void setUp() throws Exception {
+ domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/axis2/itests/HelloWorld.composite");
+ helloWorld = domain.getService(HelloWorld.class, "HelloWorldComponent");
+ }
+
+ protected void tearDown() throws Exception {
+ domain.close();
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/QuestionMarkWSDLTestCaseFIXME.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/QuestionMarkWSDLTestCaseFIXME.java
new file mode 100644
index 0000000000..11eba9a8c4
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/QuestionMarkWSDLTestCaseFIXME.java
@@ -0,0 +1,100 @@
+/*
+ * 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.axis2.itests;
+
+import java.util.List;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Port;
+import javax.wsdl.Service;
+import javax.wsdl.extensions.soap.SOAPAddress;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+import junit.framework.TestCase;
+
+import org.apache.axis2.transport.http.server.HttpUtils;
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+/**
+ * TODO: This doesn't work right now as it seems to cause hangs when running
+ * from mvn. Also running in eclipse mostly only works if you comment out
+ * one of the test methods.
+ */
+public class QuestionMarkWSDLTestCaseFIXME extends TestCase {
+
+ private SCADomain domain;
+
+ /**
+ * Tests ?wsdl works and returns the correct port endpoint from the WSDL
+ */
+ public void testWSDLPortEndpoint() throws Exception {
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose",false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments",true);
+
+ Definition definition = wsdlReader.readWSDL("http://localhost:8080/services/HelloWorldWebService?wsdl");
+ assertNotNull(definition);
+ Service service = definition.getService(new QName("http://helloworld-om", "HelloWorldService"));
+ Port port = service.getPort("HelloWorldSoapPort");
+
+ String endpoint = getEndpoint(port);
+ String ip = HttpUtils.getIpAddress();
+ assertEquals("http://" + ip + ":8080/services/HelloWorldWebService", endpoint);
+ }
+
+ /**
+ * Tests ?wsdl works and returns the correct port endpoint from binding.ws with a custom URI
+ */
+ public void testCustomEndpoint() throws Exception {
+ WSDLReader wsdlReader = WSDLFactory.newInstance().newWSDLReader();
+ wsdlReader.setFeature("javax.wsdl.verbose",false);
+ wsdlReader.setFeature("javax.wsdl.importDocuments",true);
+
+ Definition definition = wsdlReader.readWSDL("http://localhost:8080/HelloWorldService/foo/bar?wsdl");
+ assertNotNull(definition);
+ Service service = definition.getService(new QName("http://helloworld-om", "HelloWorldService"));
+ Port port = service.getPort("HelloWorldSoapPort");
+
+ String endpoint = getEndpoint(port);
+ String ip = HttpUtils.getIpAddress();
+ assertEquals("http://" + ip + ":8080/HelloWorldService/foo/bar", endpoint);
+ }
+
+ protected String getEndpoint(Port port) {
+ List wsdlPortExtensions = port.getExtensibilityElements();
+ for (final Object extension : wsdlPortExtensions) {
+ if (extension instanceof SOAPAddress) {
+ return ((SOAPAddress) extension).getLocationURI();
+ }
+ }
+ throw new RuntimeException("no SOAPAddress");
+ }
+
+ protected void setUp() throws Exception {
+ domain = SCADomain.newInstance("org/apache/tuscany/sca/binding/axis2/itests/questionmark-wsdl.composite");
+ }
+
+ protected void tearDown() throws Exception {
+ domain.close();
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java
new file mode 100644
index 0000000000..b52c10e341
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/AbstractHelloWorldOMTestCase.java
@@ -0,0 +1,62 @@
+/*
+ * 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.axis2.itests.endpoints;
+
+import junit.framework.Assert;
+import junit.framework.TestCase;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMText;
+import org.apache.tuscany.sca.binding.axis2.itests.HelloWorldOM;
+import org.apache.tuscany.sca.host.embedded.SCADomain;
+
+public abstract class AbstractHelloWorldOMTestCase extends TestCase {
+
+ private SCADomain domain;
+ private HelloWorldOM helloWorld;
+
+ public void testCalculator() throws Exception {
+ OMFactory fac = OMAbstractFactory.getOMFactory();
+ OMElement requestOM = fac.createOMElement("getGreetings", "http://helloworld-om", "helloworld");
+ OMElement parmE = fac.createOMElement("name", "http://helloworld-om", "helloworld");
+ requestOM.addChild(parmE);
+ parmE.addChild(fac.createOMText("petra"));
+ OMElement responseOM = helloWorld.getGreetings(requestOM);
+ OMElement child = (OMElement)responseOM.getFirstElement();
+ Assert.assertEquals("Hello petra", ((OMText)child.getFirstOMChild()).getText());
+ }
+
+ protected void setUp() throws Exception {
+ domain = SCADomain.newInstance(getCompositeName());
+ helloWorld = domain.getService(HelloWorldOM.class, "HelloWorldComponent");
+ }
+
+ protected void tearDown() throws Exception {
+ domain.close();
+ }
+
+ protected String getCompositeName() {
+ String className = this.getClass().getName();
+ return className.substring(0, className.length() - 8).replace('.', '/') + ".composite";
+ }
+
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/DefaultMultiServiceTestCase.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/DefaultMultiServiceTestCase.java
new file mode 100644
index 0000000000..3f1677fa90
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/DefaultMultiServiceTestCase.java
@@ -0,0 +1,24 @@
+/*
+ * 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.axis2.itests.endpoints;
+
+public class DefaultMultiServiceTestCase extends AbstractHelloWorldOMTestCase {
+ // super class does it all getting composite based on this class name
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/DefaultSingleServiceTestCase.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/DefaultSingleServiceTestCase.java
new file mode 100644
index 0000000000..9b0ee7304d
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/DefaultSingleServiceTestCase.java
@@ -0,0 +1,24 @@
+/*
+ * 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.axis2.itests.endpoints;
+
+public class DefaultSingleServiceTestCase extends AbstractHelloWorldOMTestCase {
+ // super class does it all getting composite based on this class name
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/WSDLExplicitURITestCase.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/WSDLExplicitURITestCase.java
new file mode 100644
index 0000000000..7155d80100
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/WSDLExplicitURITestCase.java
@@ -0,0 +1,24 @@
+/*
+ * 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.axis2.itests.endpoints;
+
+public class WSDLExplicitURITestCase extends AbstractHelloWorldOMTestCase {
+ // super class does it all getting composite based on this class name
+}
diff --git a/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/WSDLRelativeURITestCase.java b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/WSDLRelativeURITestCase.java
new file mode 100644
index 0000000000..ce862be74e
--- /dev/null
+++ b/sca-java-1.x/branches/sca-java-0.90/modules/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/axis2/itests/endpoints/WSDLRelativeURITestCase.java
@@ -0,0 +1,24 @@
+/*
+ * 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.axis2.itests.endpoints;
+
+public class WSDLRelativeURITestCase extends AbstractHelloWorldOMTestCase {
+ // super class does it all getting composite based on this class name
+}