Hello everyone!! I have a webService and a backend, y try to a prompt a list of users from the webService.
The connection whit the service go perfect , I use de Var0 and Var1 for the list, the webservice return me the list, and y try to catch with a backendJSP , and this is my code
[CODE]<%@page language="java" contentType="application/json" pageEncoding="UTF-8"%>
<%!
// Implement this method to execute some server-side logic.
public JSONObject performLogic(JSONObject state, Map<String, String> additionalParams) throws Exception {
String variable[] = {state.getString("Var0")};
String variable2[] = {state.getString("Var1")};
//ArrayList<String> listacod = new ArrayList();
//ArrayList<String> listanom = new ArrayList();
JSONObject result= new JSONObject();
try{
for(int i=0;i<=variable.length;i++){
for(int a=0;a<=variable2.length;a++){
String codigo = variable[i];
String nombre = variable2[a];
result.put("co_usua",codigo);
result.put("no_usua",nombre);
return result;
}
}
}catch(Exception e){
e.printStackTrace();
}
return result;
};
%>
<%-- GENERATED: DO NOT REMOVE --%>
<%@page import="org.json.JSONObject"%>
<%@page import="org.json.JSONException"%>
<%@page import="java.util.Map"%>
<%@page import="java.util.ArrayList"%>
<%@page import="java.util.List"%>
<%@page import="java.util.Iterator"%>
<%@include file="../include/backend.jspf" %>[/CODE]
But the prompt only say's "Object Object".
Any idea or similar example?
Thanks