I think I solved the problem by converting the result of sqlDataReader to a List with strings.
[WebMethod (Description =" Returns all employees")]
public List<string> GetAllEmployees()
{
RefreshConnection();
List <string> data = new List<string>();
SqlCommand sqlData = new SqlCommand("select * " +
" from Employee_Table", OpenConnection());
SqlDataReader sqlReads = sqlData.ExecuteReader();
while (sqlReads.Read())
{
data.Add((string)sqlReads.GetValue(1));
data.Add((string)sqlReads.GetValue(2));
}
return data;
}
And in java by the proxy object:
private List<String> getEmployee() throws RemoteException{
return Arrays.asList(proxy.convertToList());
}
Now my problem is how to differ between two columns?The array takes all in without formatting the result as it would be by using a resultSet.