Page 1 of 1

pushing survey data

Posted: Sun Feb 28, 2010 6:51 pm
by webtiers
Can you support a push model where for each survey response, you automatically make a web service call to a web service we publish on one of our servers? We could work with your existing data model used in your exiting SOAP service: http://survey.plumvoice.com/ws/export-r ... s.php?WSDL.

Today we pull data from you using your service: http://survey.plumvoice.com/ws/export-r ... s.php?WSDL, by polling every few minutes or so. We prefer that you dynamically push data to us.

use webservice question type and cookies on IVR survey pages

Posted: Mon Mar 01, 2010 1:05 pm
by support
Hi there,

To do this, you can put in a webservice question for IVR on each of your IVR survey pages and use cookies to chain them together.

Details explaining how you can do this can be found in this previous post.

Regards,
Plum Support

Re: pushing survey data

Posted: Sun Mar 14, 2010 10:30 am
by webtiers
so if I have a survey with 17 questions, you have to make 17 web service calls for one survey response, correct?

Re: pushing survey data

Posted: Mon Mar 15, 2010 12:48 pm
by support
Hi,

No, you wouldn't have to make 17 web service calls for one survey response.

Instead, depending on the number of pages in your survey, you would only need one SOAP webservice question for each page in your survey.

Please keep in mind of the following:

"You should provide a WSDL for your SOAP service that specifies only one function named plumEval. This function will receive two arrays of strings: one with the text of each question on the current page, and the other with all the answers received on the current page. These arrays will be indexed in the same fashion, where each array's elements will be ordered so that the questions correspond with the answers. This function should return a string, which will be saved as the response for the question calling this webservice."

Please reference this documentation for further help.

Regards,
Plum Support

Re: pushing survey data

Posted: Sun Mar 21, 2010 12:58 pm
by webtiers
Ok I understand now. Thanks. So I wrote a simple service in ASP.NET using C#. When I test my survey with:
http://websurvey.plumvoice.com/take/1952-89884960?c

I always get a 500 Internal Server error. My service wsdl is at:

http://www.webtiers.com/RSFSurveyServic ... .asmx?wsdl

Can you help me understand why I am getting this error?

Thanks.

Re: pushing survey data

Posted: Mon Mar 22, 2010 10:31 am
by support
Hi,

Your webservice and WSDL were fine. After testing this out a bit, we've noticed that .NET SOAP services seem to insist on returning scalar values wrapped in objects instead of just the scalar value itself... we weren't gracefully handling this scenario. After pushing out a patch to unwrap such return values, your service seems to be working with Plum Survey. Please try it out again and tell us how it goes...

Hope this helps,
Plum Support

Re: pushing survey data

Posted: Tue Mar 23, 2010 11:09 am
by webtiers
Yes this is working now. Thanks for such a quick and professional response!

I have trouble retrieving your Cookie with:
string ip = Server.HtmlEncode(Context.Request.Cookies["ip"].Value);

Now I am having an issue reading the string arrays that are passed in. In my C# code I have:

public string plumEval(string[] question_texts, string[] answers)

Then further on I do:

foreach (string q in question_texts)
{
s.WriteLine(q);
}
But I continue to trap an Exception:
Error: Object reference not set to an instance of an object.

It looks like the PHP string array type is not compatible with the C# equivalent. I seemed to have run into this before, but have forgotten a solution. Any help would be greatly appreciated.

Thanks, Mike

Re: pushing survey data

Posted: Tue Mar 23, 2010 12:57 pm
by webtiers
Retireving the cookie works fine. The issue I am having is getting values from the string arrays that are passed in from your PHP client.

Re: pushing survey data

Posted: Tue Mar 23, 2010 4:56 pm
by support
Hi,

Sorry, but as we lack any in-house expertise with C#, we wouldn't be able to help you directly on how to get the values from the string arrays for C#.

You could try using introspection to see exactly what is getting passed into those parameters. If this doesn't work for you, you could try parsing the values directly out of the XML.

Regards,
Plum Support

Re: pushing survey data

Posted: Tue Nov 16, 2010 12:29 am
by rvafadar
I am having an issue reading the string arrays that are passed in. In my C# code I have:

public string plumEval(string[] question_texts, string[] answers)

Then further on I do:

foreach (string q in question_texts)
{
s.WriteLine(q);
}
Both question_texts, answers are empty!!!

It looks like the PHP string array type is not compatible with the C# equivalent. . Any help would be greatly appreciated.

Thanks, Rita

Re: pushing survey data

Posted: Tue Nov 16, 2010 2:18 pm
by support
Hi Rita,

Sorry, but as mentioned in our previous post, we don't have any in-house expertise to help you with your C# code. Perhaps other developers who have worked with C# in this forum can assist you.

However, you could try using introspection to see exactly what is getting passed into those parameters. If this doesn't work for you, you could try parsing the values directly out of the XML.

Regards,
Plum Support