I have the following code...
// register new user
ConnectionRequest r = new ConnectionRequest();
r.setUrl(sUrlWebSvc);
r.setPost(true);
r.addArgument("Rest", "1"); //
r.addArgument("Req", "Register"); // R = register
r.addArgument("UserName", findField(f, "txtUserName"));
r.addArgument("Password", findField(f, "txtPassword"));
r.addArgument("FirstName", findField(f, "txtFirstName"));
r.addArgument("LastName", findField(f, "txtLastName"));
r.addArgument("Address", findField(f, "txtAddress"));
r.addArgument("City", findField(f, "txtCity"));
r.addArgument("State", findField(f, "txtState"));
r.addArgument("ZipCode", findField(f, "txtZipCode"));
r.addArgument("Email", findField(f, "txtEmail"));
// show spinning dialog while connecting
InfiniteProgress prog = new InfiniteProgress();
Dialog dlg = prog.showInifiniteBlocking();
r.setDisposeOnCompletion(dlg);
NetworkManager.getInstance().addToQueueAndWait(r);
byte[] temp = r.getResponseData();
Could someone please explain how to get the responsed data into a hash table so that I can lookup various items...
Is the response in JSON format or in XML format or CSV?
Assuming JSON format you can use:
With XML you will get a hierarchy Element object you can traverse from the XMLParser which is pretty similar. Check out the Codename One developer guide for further details.