Hi pguser1,
Thanks for your inquiry.
Before answering your web service question, please note that we have a SOAP validation tool to help you debug web service issues. For a link to this SOAP web service tester, please see
here.
We've looked into your survey and web service and have found that your web service returns neither "accepted" nor "rejected" for your digits question, "ENTER 5", with input of "11111".
Using the SOAP web service tester, here is what gets returned in the SOAP Response Envelope:
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<plumEvalResponse xmlns="http://tempuri.org/">
<plumEvalResult>
<NewDataSet xmlns="">
<Table>
<answers>11111
</answers>
</Table>
</NewDataSet>
</plumEvalResult>
</plumEvalResponse>
</soap:Body>
</soap:Envelope>
For our
sample webservice, here is what gets returned in the SOAP Response Envelope for a yes/no question of "Did you find this survey helpful?" and input of "no":
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://survey.plumvoice.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:plumEvalResponse>
<return xsi:type="xsd:string">rejected
</return>
</ns1:plumEvalResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Within our sample web service code, we had set up the following for our "plumEval" function:
Code: Select all
function plumEval($question_texts, $answers) {
foreach ($answers as $answer) {
if ($answer == 'yes') {
if ($_SESSION['accepted-once']=='yes') {
return 'accepted again';
}
$_SESSION['accepted-once']='yes';
return 'accepted';
}
}
return 'rejected';
}
As a suggestion, within your web service code, you could set up your function to return "accepted" if the answer returns a specific 5 digits such as "11111" and to return "rejected" for any other input.
Hope this helps.
Regards,
Plum Support