summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo')
-rw-r--r--sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data.java53
-rw-r--r--sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data2.java35
-rw-r--r--sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/POJOWSTestCase.java48
-rw-r--r--sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestService.java29
-rw-r--r--sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestServiceImpl.java59
-rw-r--r--sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/package-info.java21
6 files changed, 245 insertions, 0 deletions
diff --git a/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data.java b/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data.java
new file mode 100644
index 0000000000..8c1e6b68da
--- /dev/null
+++ b/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data.java
@@ -0,0 +1,53 @@
+/*
+ * 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.itests.pojo;
+
+//import java.io.Serializable;
+
+public class Data {
+
+ private Data2[] a = null;
+ private int b = 0;
+ private float c = 0.0f;
+
+ public Data2[] getA() {
+ return this.a;
+ }
+
+ public void setA(Data2[] a) {
+ this.a = a;
+ }
+
+ public int getB() {
+ return this.b;
+ }
+
+ public void setB(int b) {
+ this.b = b;
+ }
+
+ public float getC() {
+ return this.c;
+ }
+
+ public void setC(float c) {
+ this.c = c;
+ }
+
+}
diff --git a/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data2.java b/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data2.java
new file mode 100644
index 0000000000..25954a0603
--- /dev/null
+++ b/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/Data2.java
@@ -0,0 +1,35 @@
+/*
+ * 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.itests.pojo;
+
+public class Data2 {
+
+ private String[] asdf = null;
+
+ public String[] getAsdf() {
+ return this.asdf;
+ }
+
+ public void setAsdf(String[] asdf) {
+ this.asdf = asdf;
+ }
+
+
+}
diff --git a/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/POJOWSTestCase.java b/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/POJOWSTestCase.java
new file mode 100644
index 0000000000..35849ef77b
--- /dev/null
+++ b/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/POJOWSTestCase.java
@@ -0,0 +1,48 @@
+/*
+ * 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.itests.pojo;
+
+import org.apache.tuscany.sca.node.SCAContribution;
+import org.apache.tuscany.sca.node.SCANode;
+import org.apache.tuscany.sca.node.SCANodeFactory;
+import org.junit.Test;
+
+public class POJOWSTestCase {
+
+ @Test
+ public void testWS() throws Exception {
+
+ SCAContribution contrib = new SCAContribution("c1", "target/test-classes");
+ SCANode node = SCANodeFactory.newInstance().createSCANode("org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/test.composite", contrib);
+ node.start();
+
+// try {
+// System.out.println("Test server started (press enter to shutdown)");
+// System.in.read();
+// }
+// catch (IOException e) {
+// System.err.println(e);
+// e.printStackTrace();
+// }
+
+ node.stop();
+ System.out.println("Test server stopped");
+ }
+
+}
diff --git a/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestService.java b/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestService.java
new file mode 100644
index 0000000000..2becc472b8
--- /dev/null
+++ b/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestService.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.ws.axis2.itests.pojo;
+
+import org.osoa.sca.annotations.Remotable;
+
+
+@Remotable
+public interface TestService {
+
+ public boolean printData(Data data);
+
+}
diff --git a/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestServiceImpl.java b/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestServiceImpl.java
new file mode 100644
index 0000000000..1946d67d79
--- /dev/null
+++ b/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/TestServiceImpl.java
@@ -0,0 +1,59 @@
+/*
+ * 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.itests.pojo;
+
+import java.util.Arrays;
+
+import org.osoa.sca.annotations.Service;
+
+@Service(TestService.class)
+public class TestServiceImpl implements TestService {
+
+ public boolean printData(Data data) {
+ if (data == null) {
+ System.out.println("data is null");
+ return false;
+ }
+
+ StringBuilder sb = new StringBuilder(256);
+ sb.append("Data:\n");
+ Data2[] a = data.getA();
+ if (a != null) {
+ for (int i = 0; i < a.length; i++) {
+ sb.append(" a[");
+ sb.append(i);
+ sb.append("] = ");
+ sb.append(Arrays.asList(a[i].getAsdf()));
+ sb.append("\n");
+ }
+ } else {
+ sb.append(" a = null");
+ }
+ sb.append("\n b = ");
+ sb.append(data.getB());
+ sb.append("\n c = ");
+ sb.append(data.getC());
+ sb.append("\n");
+
+ System.out.println(sb.toString());
+
+ return true;
+ }
+
+}
diff --git a/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/package-info.java b/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/package-info.java
new file mode 100644
index 0000000000..7c8867530e
--- /dev/null
+++ b/sca-java-1.x/tags/1.6-TUSCANY-3909/binding-ws-axis2/src/test/java/org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/package-info.java
@@ -0,0 +1,21 @@
+/*
+ * 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.
+ */
+// @javax.xml.bind.annotation.XmlSchema(namespace="http://test/server")
+package org.apache.tuscany.sca.binding.ws.axis2.itests.pojo;
+