I am using Axis 1.1RC2. generated the client files using Wsdl2java. and then using a jsp as testclient
I was getting this no deserializer defined for Array type error
And gurus suggest me to use the nightly fix.
That was out. but now I am getting
java.lang.ArrayIndexOutOfBoundsException: 1 at org.apache.jsp.search_jsp.printPersons(search_jsp.java:62) at org.apache.jsp.search_jsp._jspService(search_jsp.java:259) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:204) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
The service is running fine when I send a SOAPRequest using XML spy
then clearly the service is working :)
Also the service is being accessed. the problem is in the client classes. I think AXIS is not deserializing properly the data strucuture arrays. Since I specified the client-config.wsdd file, it did got "the no deserializer defined for Array type" fixed. but now it does not know how to deserialize
printPersons is a simple array of a data strucuture that contains perid and personname
public void printPersons(JspWriter out, Person[] persons) throws IOException { int j=0; while(persons[j]!=null){ out.write("<a class=fl href='person/perid" +persons[j].getPerID()+"'>"+persons[j].getPersonName()+"</a>" +"<br/>"); j++; } }
What exactly are you expecting here? specifically, what assumptions are you making about the array that comes back, and/or what assumptions are you making about arrays in java.
This is not the normal way to iterate through an array in Java.
-steve