I have written a simple HelloWorld web service. Which takes an ArrayList as parameter. Code is as simple as `import java.util.ArrayList;
public class Service {
public void service(ArrayList<Object> list) {
System.out.println("Hello World..");
}
}`
I am using Eclipse Helios SR1 and trying to geneate the Web service.
Selecting Webservice Implementation to “Service” and Selecting Server runtime as Tomcat 6.0 and webservice runtime as Apache Axis. Clicking on next gives warning as
The service class "Service" does not comply to one or more requirements of the JAX-RPC 1.1 specification, and may not deploy or function correctly.
The method “service” on the service class "Service" uses a data type, "java.util.ArrayList", that is not supported by the JAX-RPC specification. Instances of the type may not serialize or deserialize correctly. Loss of data or complete failure of the Web service may result.
Clicking ok to continue and it shows more warning one by one :
The input type java.lang.Class is a non-instantiable type and will be omitted from the sample JSP. Continue with sample JSP generation?
The input type javax.xml.namespace.QName is a non-instantiable type and will be omitted from the sample JSP. Continue with sample JSP generation?
IWAB0189W The Sample JSP client omitted some methods because they contained unsupported types.
Any reason why it may be happening?
I saw on Sun site : Sun RPC Doc
According to it ArrayList should be supported.
Any help?
As quoted from the specification.
A simple modification of your method signature to accept an array as opposed to an ArrayList should fix the problem.