Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

problems with RemoteControl

  • mama0107
  • mama0107's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 3 months ago #160916 by mama0107
problems with RemoteControl was created by mama0107
I work with version 2.62 of the Limesurvey. I would like to manage my survey with a small Java program. I use jdk1.8.0_91 and RemoteControl with json.


post.setEntity( new StringEntity("{\"method\": \"activate_tokens\", \"params\":[\""+sessionKey+"\", \""+surveyid+"\", \""+attarray+"\" ],\"id\":1}"));

Result {"id":1,"result":{"status":"OK"},"error":null}


Hashtable<String, String> participantData2 = new Hashtable<String, String>();
participantData2.put("email","eva.musterfrau@web.de");
participantData2.put("lastname","Musterfrau");
participantData2.put("firstname","Eva");
participantData2.put("token", "zgaTDnMSvcJI31V");
participantData2.put("language", "de");
participantData2.put("emailstatus","OK");
Boolean createToken = false;

post.setEntity( new StringEntity("{\"method\": \"add_participants\", \"params\":[\""+sessionKey+"\", \""+surveyid+"\", \""+participantData2+"\","+createToken+"],\"id\":2}"));

Result {"id":2,"result":"{email=eva.musterfrau@web.de, token=zgaTDnMSvcJI31V, lastname=Musterfrau, firstname=Eva, emailstatus=OK, language=de}","error":null}


post.setEntity( new StringEntity("{\"method\": \"release_session_key\", \"params\":[\""+sessionKey+"\"], \"id\": 99}"));

Result {"id":99,"result":"OK","error":null}


The participant list was activated, but no participant is created. I can’t find the cause.


Best regards Cornelia
The topic has been locked.

Lime-years ahead

Online-surveys for every purse and purpose