I am running my webservice that returns a set of values from a database. It will return a value as a string no problem, so I know it is connecting. It is now giving me a "nullpointerexception" error when I try to print out the first value(or any) in my arraylist. I am assuming it won't pass this type. I tried passing type CachedRowSet and it wouldn't even run, it gave a WSDL parsing error.
Does anyone know how to pass an ArrayList or a CachedRowSet to a client? Or how to populate a ResultSet with more than one value when you have more than one SQL statement bringing info into it? (It was writing over the old value with the new value everytime it went through the loop.)
Here is my server side code to generate the arraylist...
ResultSet rs = stmt.executeQuery(query);
int i = 0;
Object arrayValue;
while (rs.next()){
arrayValue = rs.getString("end_phrase");
returnArray.add(arrayValue);
}
conn.close();
return returnArray;
Here is the client side bringing it in...
resultArray = myProxy.sayHello(rapArray);
String objectName = (String) resultArray.get(0);
System.out.println(objectName);