summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/trunk/itest/wsdlgen-verify
diff options
context:
space:
mode:
authornash <nash@13f79535-47bb-0310-9956-ffa450edef68>2011-06-09 09:58:11 +0000
committernash <nash@13f79535-47bb-0310-9956-ffa450edef68>2011-06-09 09:58:11 +0000
commit051cc5a4b4076997335312b016c0326d0935f9b3 (patch)
treea969ee9dd5bbc1299cee258e76f5b781ed079b72 /sca-java-1.x/trunk/itest/wsdlgen-verify
parentd9e0a73826902ae27d9757427b56a90276878e4c (diff)
TUSCANY-3869: Add tests to 1.x for POJO type in different package than the interface
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1133760 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/trunk/itest/wsdlgen-verify')
-rw-r--r--sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/other/OtherPojo.java48
-rw-r--r--sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/other/package-info.java23
-rw-r--r--sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/verify/DataTypes.java3
-rw-r--r--sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/verify/impl/DataTypesImpl.java4
-rw-r--r--sca-java-1.x/trunk/itest/wsdlgen-verify/src/test/java/wsdlgen/verify/DataTypesTestCase.java17
5 files changed, 93 insertions, 2 deletions
diff --git a/sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/other/OtherPojo.java b/sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/other/OtherPojo.java
new file mode 100644
index 0000000000..08e866036d
--- /dev/null
+++ b/sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/other/OtherPojo.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 wsdlgen.other;
+
+public class OtherPojo {
+ private double real, imaginary;
+
+ public OtherPojo(double real, double imaginary) {
+ this.real = real;
+ this.imaginary = imaginary;
+ }
+
+ public OtherPojo() {
+ }
+
+ public double getReal() {
+ return real;
+ }
+
+ public void setReal(double real) {
+ this.real = real;
+ }
+
+ public double getImaginary() {
+ return imaginary;
+ }
+
+ public void setImaginary(double imaginary) {
+ this.imaginary = imaginary;
+ }
+}
diff --git a/sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/other/package-info.java b/sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/other/package-info.java
new file mode 100644
index 0000000000..852ccd2300
--- /dev/null
+++ b/sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/other/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+@XmlSchema(namespace = "http://other.jtest/")
+package wsdlgen.other;
+
+import javax.xml.bind.annotation.XmlSchema;
diff --git a/sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/verify/DataTypes.java b/sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/verify/DataTypes.java
index 58c5f3df69..2c6fb8a2c1 100644
--- a/sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/verify/DataTypes.java
+++ b/sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/verify/DataTypes.java
@@ -25,6 +25,7 @@ import javax.jws.soap.SOAPBinding;
import commonj.sdo.DataObject;
import org.osoa.sca.ServiceReference;
import org.osoa.sca.annotations.Remotable;
+import wsdlgen.other.OtherPojo;
@Remotable
public interface DataTypes {
@@ -49,6 +50,8 @@ public interface DataTypes {
void testComplex(ComplexNumber complex);
+ void testOtherPackage(OtherPojo pojo);
+
void testByteArray(byte[] byteArray);
void testBaseExtension(ExtClass ext);
diff --git a/sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/verify/impl/DataTypesImpl.java b/sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/verify/impl/DataTypesImpl.java
index cdb8c6e0a1..4ffdaa8152 100644
--- a/sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/verify/impl/DataTypesImpl.java
+++ b/sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/verify/impl/DataTypesImpl.java
@@ -24,6 +24,7 @@ import javax.jws.WebParam;
import javax.jws.soap.SOAPBinding;
import commonj.sdo.DataObject;
import org.osoa.sca.ServiceReference;
+import wsdlgen.other.OtherPojo;
import wsdlgen.verify.BaseClass;
import wsdlgen.verify.ComplexNumber;
import wsdlgen.verify.DataTypes;
@@ -62,6 +63,9 @@ public class DataTypesImpl implements DataTypes {
public void testComplex(ComplexNumber complex) {
}
+ public void testOtherPackage(OtherPojo pojo) {
+ }
+
public void testByteArray(byte[] byteArray) {
}
diff --git a/sca-java-1.x/trunk/itest/wsdlgen-verify/src/test/java/wsdlgen/verify/DataTypesTestCase.java b/sca-java-1.x/trunk/itest/wsdlgen-verify/src/test/java/wsdlgen/verify/DataTypesTestCase.java
index 2accda0a6a..ba0dafad16 100644
--- a/sca-java-1.x/trunk/itest/wsdlgen-verify/src/test/java/wsdlgen/verify/DataTypesTestCase.java
+++ b/sca-java-1.x/trunk/itest/wsdlgen-verify/src/test/java/wsdlgen/verify/DataTypesTestCase.java
@@ -48,14 +48,18 @@ public class DataTypesTestCase extends BaseFramework {
@Test
public void testSimpleMultiArrayInt() throws Exception {
Element paramElement = parameterElement("testSimpleMultiArrayInt");
- assertEquals("ns1:intArray", paramElement.getAttribute("type"));
+ // prefix name can vary, so compare only the fixed parts
+ assertEquals("ns", paramElement.getAttribute("type").substring(0, 2));
+ assertEquals(":intArray", paramElement.getAttribute("type").substring(3));
assertEquals("unbounded", paramElement.getAttribute("maxOccurs"));
}
@Test
public void testSimpleMulti3ArrayInt() throws Exception {
Element paramElement = parameterElement("testSimpleMulti3ArrayInt");
- assertEquals("ns1:intArrayArray", paramElement.getAttribute("type"));
+ // prefix name can vary, so compare only the fixed parts
+ assertEquals("ns", paramElement.getAttribute("type").substring(0, 2));
+ assertEquals(":intArrayArray", paramElement.getAttribute("type").substring(3));
assertEquals("unbounded", paramElement.getAttribute("maxOccurs"));
}
@@ -102,6 +106,15 @@ public class DataTypesTestCase extends BaseFramework {
}
@Test
+ public void testOtherPackage() throws Exception {
+ String paramType = parameterType("testOtherPackage");
+ // prefix name can vary, so compare only the fixed parts
+ assertEquals("ns", paramType.substring(0, 2));
+ assertEquals(":otherPojo", paramType.substring(3));
+ assertEquals("xs:double", firstChild(typeDefinition(paramType)).getAttribute("type"));
+ }
+
+ @Test
public void testByteArray() throws Exception {
assertEquals("xs:base64Binary", parameterType("testByteArray"));
}