summaryrefslogtreecommitdiffstats
path: root/sca-java-1.x/trunk
diff options
context:
space:
mode:
authornash <nash@13f79535-47bb-0310-9956-ffa450edef68>2011-03-27 14:02:43 +0000
committernash <nash@13f79535-47bb-0310-9956-ffa450edef68>2011-03-27 14:02:43 +0000
commit1072e3151c8fcad4554ca68908708f27b2aca149 (patch)
tree95ffa40c968dfee29d78fad9671aa7a87066a366 /sca-java-1.x/trunk
parent5bc28d89bad4a52598db1869a3c43a1e973250e1 (diff)
Add test for @WebParam annotation
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1085938 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-1.x/trunk')
-rw-r--r--sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/verify/DataTypes.java8
-rw-r--r--sca-java-1.x/trunk/itest/wsdlgen-verify/src/main/java/wsdlgen/verify/impl/DataTypesImpl.java12
-rw-r--r--sca-java-1.x/trunk/itest/wsdlgen-verify/src/test/java/wsdlgen/verify/DataTypesTestCase.java24
3 files changed, 35 insertions, 9 deletions
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 23a062ff80..68b87d3947 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
@@ -54,11 +54,15 @@ public interface DataTypes {
DataObject testDynamicSDO();
+ void testWebParamSDO(@WebParam(name="foo") DataObject myObject);
+
+ void testWebParamSDOArray(@WebParam(name="foo") DataObject[] myArray);
/*
+
@SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.BARE)
- void testWebParam(@WebParam(name="simpleInt") int simple);
+ void testWebParamBare(@WebParam(name="simpleInt") int simple);
@SOAPBinding(parameterStyle=SOAPBinding.ParameterStyle.BARE)
- void testWebParamArray(@WebParam(name="arrayInt") int[] array);
+ void testWebParamBareArray(@WebParam(name="arrayInt") int[] array);
*/
}
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 13e17a63fa..55e59947ad 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
@@ -69,9 +69,17 @@ public class DataTypesImpl implements DataTypes {
return null;
}
- public void testWebParam(int simple) {
+ public void testWebParamSDO(DataObject myObject) {
}
- public void testWebParamArray(int[] array) {
+ public void testWebParamSDOArray(DataObject[] myArray) {
}
+/*
+
+ public void testWebParamBare(int simple) {
+ }
+
+ public void testWebParamBareArray(int[] array) {
+ }
+*/
}
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 cc0de43b29..9071edb986 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
@@ -116,25 +116,39 @@ public class DataTypesTestCase extends BaseFramework {
assertEquals("xs:anyType", returnType("testDynamicSDO"));
}
+ @Test
+ public void testWebParamSDO() throws Exception {
+ Element paramElement = parameterElement("testWebParamSDO");
+ assertEquals("foo", paramElement.getAttribute("name"));
+ assertEquals("xs:anyType", paramElement.getAttribute("type"));
+ }
+
+ @Test
+ public void testWebParamSDOArray() throws Exception {
+ Element paramElement = parameterElement("testWebParamSDOArray");
+ assertEquals("foo", paramElement.getAttribute("name"));
+ assertEquals("xs:anyType", paramElement.getAttribute("type"));
+ assertEquals("unbounded", paramElement.getAttribute("maxOccurs"));
+ }
/*
+
@Test
- public void testWebParam() throws Exception {
- Element paramElement = parameterElement("testWebParam");
+ public void testWebParamBare() throws Exception {
+ Element paramElement = parameterElement("testWebParamBare");
assertEquals("simpleInt", paramElement.getAttribute("name"));
assertEquals("xs:int", paramElement.getAttribute("type"));
}
@Test
@Ignore
- public void testWebParamArray() throws Exception {
- Element paramElement = parameterElement("testWebParamArray");
+ public void testWebParamBareArray() throws Exception {
+ Element paramElement = parameterElement("testWebParamBareArray");
assertEquals("arrayInt", paramElement.getAttribute("name"));
assertEquals("xs:int", paramElement.getAttribute("type"));
assertEquals("unbounded", paramElement.getAttribute("maxOccurs"));
}
*/
-
@BeforeClass
public static void setUpBeforeClass() throws Exception {
BaseFramework.start("DataTypes");