Welcome to the LimeSurvey Community Forum

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

Probleme bei add_participants mit RemoteControl

  • mama0107
  • mama0107's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 years 4 months ago #160876 by mama0107
Ich arbeite mit der Version 2.62 des Limesurvey. Mit einem kleinen Java-Programm möchte ich meine Umfrage verwalten. Dabei nutze ich jdk1.8.0_91 und RemoteControl mit json.


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

Ergebnis {"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}"));

Ergebnis {"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}"));

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


Die Teilnehmerliste wurde aktivieren, aber es wird kein Teilnehmer angelegt. Woran könnte mein Problem liegen?

Andere Funktionen wie export_responses oder list_users funktionieren auch.


Viele Grüße Cornelia
The topic has been locked.
Moderators: Joffm

Lime-years ahead

Online-surveys for every purse and purpose