10-22-2009 09:23 AM
   public void execute(WebScriptRequest req, WebScriptResponse res)
         throws IOException {
       try {      
            services.getNodeService().getStores();
       } catch(Exception e) {
        res.getWriter().write("\n\n"+ e.getMessage()+"\n\n"+ e.getStackTrace()+"\n\n"+ e.getCause()+"\n\n"+ "error class= "+e.getClass()   + "\n\n\n\n\n\n");
                   }
      try{         
         // build a json object
          JSONObject obj = new JSONObject();
          
          // put some data on it
          obj.put("idEstado", "200");
          obj.put("estado", "OK");
          obj.put("uid", System.currentTimeMillis());
          
          // build a JSON string and send it back
          String jsonString = obj.toString();
          res.getWriter().write(jsonString);
      }
       catch(JSONException e)
       {
          throw new WebScriptException("Unable to serialize JSON");
       }       
   }10-26-2009 05:47 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.