pushing survey data

Questions and answers about Plum Survey

Moderators: support, admin

pushing survey data

Postby webtiers » Sun Feb 28, 2010 7:51 pm

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.
webtiers
 
Posts: 6
Joined: Sun Feb 28, 2010 7:36 pm

use webservice question type and cookies on IVR survey pages

Postby support » Mon Mar 01, 2010 2:05 pm

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
Plum Voice IVR Solutions
IVR Hosting, Systems and Professional Services
Visit: http://www.plumvoice.com
support
 
Posts: 2184
Joined: Mon Jun 02, 2003 4:47 pm
Location: Boston, MA

Re: pushing survey data

Postby webtiers » Sun Mar 14, 2010 11:30 am

so if I have a survey with 17 questions, you have to make 17 web service calls for one survey response, correct?
webtiers
 
Posts: 6
Joined: Sun Feb 28, 2010 7:36 pm

Re: pushing survey data

Postby support » Mon Mar 15, 2010 1:48 pm

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
Plum Voice IVR Solutions
IVR Hosting, Systems and Professional Services
Visit: http://www.plumvoice.com
support
 
Posts: 2184
Joined: Mon Jun 02, 2003 4:47 pm
Location: Boston, MA

Re: pushing survey data

Postby webtiers » Sun Mar 21, 2010 1:58 pm

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.
webtiers
 
Posts: 6
Joined: Sun Feb 28, 2010 7:36 pm

Re: pushing survey data

Postby support » Mon Mar 22, 2010 11:31 am

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
Plum Voice IVR Solutions
IVR Hosting, Systems and Professional Services
Visit: http://www.plumvoice.com
support
 
Posts: 2184
Joined: Mon Jun 02, 2003 4:47 pm
Location: Boston, MA

Re: pushing survey data

Postby webtiers » Tue Mar 23, 2010 12:09 pm

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
webtiers
 
Posts: 6
Joined: Sun Feb 28, 2010 7:36 pm

Re: pushing survey data

Postby webtiers » Tue Mar 23, 2010 1:57 pm

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.
webtiers
 
Posts: 6
Joined: Sun Feb 28, 2010 7:36 pm

Re: pushing survey data

Postby support » Tue Mar 23, 2010 5:56 pm

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
Plum Voice IVR Solutions
IVR Hosting, Systems and Professional Services
Visit: http://www.plumvoice.com
support
 
Posts: 2184
Joined: Mon Jun 02, 2003 4:47 pm
Location: Boston, MA


Return to Plum Survey Q&A

Who is online

Users browsing this forum: No registered users and 1 guest