Bonjour,
J'ai une fonction qui retourne un arraylist contenant des informations d'une table base des données. Je souhaite utiliser cette fonction à partir du web services mais j'ai pas d'idées s'il est possible ou pas ? Et comment ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 public ArrayList<Facture> getAll(String s) throws SQLException{ ArrayList<Facture> listFacture = new ArrayList<Facture> (); res = stmt.executeQuery(s); while (res.next()){ Facture ff = new Facture (); ff.setId_f(res.getString(1)); ff.setMo(res.getString(2)); ff.setDa(res.getString(3)); ff.setTy(res.getString(4)); ff.setCin_cli(res.getString(5)); ff.setPr_f(res.getString(7)); ff.setNo_f(res.getString(8)); ff.setVi_f(res.getString(9)); ff.setSe_f(res.getString(10)); ff.setAd_f(res.getString(11)); ff.setTe_f(res.getString(12)); ff.setMa_f(res.getString(13)); listFacture.add(ff); } return listFacture ; }
Partager