summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main')
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Bar.java152
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Foo.java88
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java64
-rw-r--r--sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java49
4 files changed, 353 insertions, 0 deletions
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Bar.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Bar.java
new file mode 100644
index 0000000000..1f330aa441
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Bar.java
@@ -0,0 +1,152 @@
+/*
+ * 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.jaxws.external.service;
+
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for bar complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="bar">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="b" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
+ * &lt;element name="s" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
+ * &lt;element name="x" type="{http://www.w3.org/2001/XMLSchema}int"/>
+ * &lt;element name="y" type="{http://www.w3.org/2001/XMLSchema}int" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "bar", propOrder = {
+ "b",
+ "s",
+ "x",
+ "y"
+})
+public class Bar {
+
+ protected Boolean b;
+ protected String s;
+ protected int x;
+ protected Integer y;
+
+ /**
+ * Gets the value of the b property.
+ *
+ * @return
+ * possible object is
+ * {@link Boolean }
+ *
+ */
+ public Boolean isB() {
+ return b;
+ }
+
+ /**
+ * Sets the value of the b property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Boolean }
+ *
+ */
+ public void setB(Boolean value) {
+ this.b = value;
+ }
+
+ /**
+ * Gets the value of the s property.
+ *
+ * @return
+ * possible object is
+ * {@link String }
+ *
+ */
+ public String getS() {
+ return s;
+ }
+
+ /**
+ * Sets the value of the s property.
+ *
+ * @param value
+ * allowed object is
+ * {@link String }
+ *
+ */
+ public void setS(String value) {
+ this.s = value;
+ }
+
+ /**
+ * Gets the value of the x property.
+ *
+ */
+ public int getX() {
+ return x;
+ }
+
+ /**
+ * Sets the value of the x property.
+ *
+ */
+ public void setX(int value) {
+ this.x = value;
+ }
+
+ /**
+ * Gets the value of the y property.
+ *
+ * @return
+ * possible object is
+ * {@link Integer }
+ *
+ */
+ public Integer getY() {
+ return y;
+ }
+
+ /**
+ * Sets the value of the y property.
+ *
+ * @param value
+ * allowed object is
+ * {@link Integer }
+ *
+ */
+ public void setY(Integer value) {
+ this.y = value;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Foo.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Foo.java
new file mode 100644
index 0000000000..1b22153169
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/Foo.java
@@ -0,0 +1,88 @@
+/*
+ * 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.jaxws.external.service;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * <p>Java class for foo complex type.
+ *
+ * <p>The following schema fragment specifies the expected content contained within this class.
+ *
+ * <pre>
+ * &lt;complexType name="foo">
+ * &lt;complexContent>
+ * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
+ * &lt;sequence>
+ * &lt;element name="bars" type="{http://ws.binding.sca.tuscany.apache.org/}bar" maxOccurs="unbounded" minOccurs="0"/>
+ * &lt;/sequence>
+ * &lt;/restriction>
+ * &lt;/complexContent>
+ * &lt;/complexType>
+ * </pre>
+ *
+ *
+ */
+@XmlAccessorType(XmlAccessType.FIELD)
+@XmlType(name = "foo", propOrder = {
+ "bars"
+})
+public class Foo {
+
+ @XmlElement(nillable = true)
+ protected List<Bar> bars;
+
+ /**
+ * Gets the value of the bars property.
+ *
+ * <p>
+ * This accessor method returns a reference to the live list,
+ * not a snapshot. Therefore any modification you make to the
+ * returned list will be present inside the JAXB object.
+ * This is why there is not a <CODE>set</CODE> method for the bars property.
+ *
+ * <p>
+ * For example, to add a new item, do as follows:
+ * <pre>
+ * getBars().add(newItem);
+ * </pre>
+ *
+ *
+ * <p>
+ * Objects of the following type(s) are allowed in the list
+ * {@link Bar }
+ *
+ *
+ */
+ public List<Bar> getBars() {
+ if (bars == null) {
+ bars = new ArrayList<Bar>();
+ }
+ return this.bars;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java
new file mode 100644
index 0000000000..129365b5e4
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldService.java
@@ -0,0 +1,64 @@
+/*
+ * 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.jaxws.external.service;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebResult;
+import javax.jws.WebService;
+import javax.xml.ws.RequestWrapper;
+import javax.xml.ws.ResponseWrapper;
+
+@WebService(name = "HelloWorldService", targetNamespace = "http://helloworld/external")
+public class HelloWorldService {
+
+ @WebMethod
+ @WebResult(name = "getGreetingsReturn", targetNamespace = "http://helloworld/external")
+ @RequestWrapper(localName = "getGreetings", targetNamespace = "http://helloworld/external", className = "org.apache.tuscany.sca.binding.ws.jaxws.external.service.GetGreetings")
+ @ResponseWrapper(localName = "getGreetingsResponse", targetNamespace = "http://helloworld/external", className = "org.apache.tuscany.sca.binding.ws.jaxws.external.service.GetGreetingsResponse")
+ public String getGreetings( @WebParam(name = "name", targetNamespace = "http://helloworld/external")
+ String name) {
+ System.out.println("Entering External Service HelloWorld.getGreetings: " + name);
+ String response = "Hello " + name;
+ System.out.println("Leaving External Service HelloWorld.getGreetings: " + response);
+ return response;
+ }
+
+ public Foo getGreetingsComplex(Foo foo){
+ System.out.println("Entering External Service HelloWorld.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ Foo response = foo;
+ Bar b3 = new Bar();
+ b3.setS("simon");
+ b3.setX(7);
+ b3.setY(new Integer(8));
+ b3.setB(Boolean.TRUE);
+ response.getBars().add(b3);
+ System.out.println("Leaving External Service HelloWorld.getGreetingsComplex: " + foo.getBars().get(0).getS());
+ return response;
+ }
+
+ public String GetGreetingsCaps(String name) {
+ System.out.println("Entering External Service HelloWorld.GetGreetingsCaps: " + name);
+ String response = "Hello " + name;
+ System.out.println("Leaving External Service HelloWorld.GetGreetingsCaps: " + response);
+ return response;
+ }
+
+}
diff --git a/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java
new file mode 100644
index 0000000000..3a6266f1ef
--- /dev/null
+++ b/sca-java-2.x/tags/2.0.1-RC1/testing/itest/ws/external-service/src/main/java/org/apache/tuscany/sca/binding/ws/jaxws/external/service/HelloWorldServiceLauncher.java
@@ -0,0 +1,49 @@
+/*
+ * 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.jaxws.external.service;
+
+import javax.xml.ws.Endpoint;
+
+public class HelloWorldServiceLauncher {
+
+ public Endpoint endpoint;
+
+ public HelloWorldServiceLauncher(){
+
+ }
+
+ public void createService(){
+ System.out.println(">>> Starting external JAXWS service at http://localhost:8086/External/HelloWorld");
+
+ // default JVM JAXWS support.
+ endpoint= Endpoint.publish("http://localhost:8086/External/HelloWorld",
+ new HelloWorldService());
+ }
+
+ public void destoryService(){
+ System.out.println(">>> Stopping external JAXWS service at http://localhost:8086/External/HelloWorld");
+ endpoint.stop();
+ }
+
+ public static void main(String[] args) throws Exception {
+ HelloWorldServiceLauncher launcher = new HelloWorldServiceLauncher();
+ launcher.createService();
+ }
+}