Hi ,
I have written a method and the return type of the method if array . Somehow I am not able to see any output on webserivce navigator. But when I run the same program as standalone application it works. Here is the code -
public String[] postGRData() {
String[] AUFNR = new String[20];
for (int i = 0; i < AUFNR.length; i++) {
AUFNR<i> = new String();
}
try {
Connection conn;
InitialContext ctx = new InitialContext();
DataSource dataSource =
(DataSource) ctx.lookup(readPropertyFiles());
conn = dataSource.getConnection();
ResultSet rs;
PreparedStatement stmt =
conn.prepareStatement(
"select * from zae_prod_grtable where status = ?");
stmt.setInt(1, 1);
rs = stmt.executeQuery();
int i = 0;
while (rs.next()) {
AUFNR<i> = rs.getString("AUFNR");
i = i + 1;
}
stmt.close();
conn.close();
return AUFNR;
} catch (Exception ex) {
}
return AUFNR;
}