Author: alessio.soldano(a)jboss.com
Date: 2009-01-21 04:41:52 -0500 (Wed, 21 Jan 2009)
New Revision: 9073
Modified:
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
Log:
[JBWS-2477] Adding testcase (actually modifying the smoke tool ones)
Modified:
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java
===================================================================
---
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java 2009-01-21
09:40:14 UTC (rev 9072)
+++
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/CalculatorBean.java 2009-01-21
09:41:52 UTC (rev 9073)
@@ -21,8 +21,11 @@
*/
package org.jboss.test.ws.jaxws.smoke.tools;
+import java.util.HashMap;
+import java.util.Set;
+
+import javax.jws.WebMethod;
import javax.jws.WebService;
-import javax.jws.WebMethod;
@WebService(targetNamespace = "http://foo.bar.com/calculator")
public class CalculatorBean
@@ -38,4 +41,13 @@
{
return a-b;
}
+
+ @WebMethod
+ public Set<Integer> getKeys(HashMap<Integer, String> map)
+ {
+ if (map != null)
+ return map.keySet();
+ else
+ return null;
+ }
}
Modified:
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java
===================================================================
---
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2009-01-21
09:40:14 UTC (rev 9072)
+++
framework/branches/jaxws21/testsuite/test/java/org/jboss/test/ws/jaxws/smoke/tools/WSProviderPlugin.java 2009-01-21
09:41:52 UTC (rev 9073)
@@ -27,9 +27,12 @@
import org.w3c.dom.Element;
import javax.xml.bind.annotation.XmlRootElement;
+
+import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileInputStream;
+import java.io.FileReader;
import java.io.PrintStream;
import java.net.URL;
import java.net.URLClassLoader;
@@ -93,7 +96,7 @@
}
- private void verifyJavaSource(File directory)
+ private void verifyJavaSource(File directory) throws Exception
{
File javaSource = new File(
directory.getAbsolutePath()+
@@ -101,6 +104,30 @@
);
assertTrue("Source not generated", javaSource.exists());
+
+ javaSource = new File(directory.getAbsolutePath() + FS + "org" + FS +
"jboss" + FS + "test" + FS + "ws" + FS + "jaxws" +
FS + "smoke" + FS + "tools" + FS
+ + "jaxws" + FS + "GetKeysResponse.java");
+
+ assertTrue("Source not generated", javaSource.exists());
+
+ BufferedReader input = new BufferedReader(new FileReader(javaSource));
+ StringBuilder sb = new StringBuilder();
+ try
+ {
+ String line = null;
+ while ((line = input.readLine()) != null)
+ {
+ sb.append(line);
+ sb.append(System.getProperty("line.separator"));
+ }
+ }
+ finally
+ {
+ input.close();
+ }
+
+ //[JBWS-2477] check support for generics
+ assertTrue("Didn't found method \"public Set<Integer>
getReturn()\"", sb.toString().contains("public Set<Integer>
getReturn()"));
}
/**
Show replies by date