Web service post with void function calls

Dedicated forum for the visual 'drag and drop' voice application designer that allows easy creation of advanced voice applications without programming knowledge

Moderators: kevin, 3CX staff

Web service post with void function calls

Postby SWSDEV » Tue Oct 06, 2009 4:58 pm

I thought I'd share, I don't know if this was intentional or not, but as I was having difficulting using the web service component (I was getting an error regarding no root element in the xml) I discovered that you can't call a function that has a void return.

Since I wasn't trying to read any data back from the web service, I couldn't figure out why I was getting an error regarding the return data.

Once I simply had the webservice return "OK" or "ERROR", then the IVR didn't complain about it any more.

This was a SOAP based web service.
Shahzad Qureshi
SWS Development - 3CX Certified Partner
Custom 3CX integration
Salt Lake City, UT USA
801-938-7712
swsdev.com
SWSDEV
Expert
Expert
 
Posts: 246
Joined: Sat Feb 23, 2008 6:51 am
Location: Salt Lake City, Utah - USA

Re: Web service post with void function calls

Postby VAD_Support » Tue Oct 06, 2009 5:29 pm

Thanks for your feedback, maybe this is a bug in the VAD, we'll verify it.
As a workarround, you can use the Web Interaction component to do that. You can invoke your web service sending a POST request, and the response can be ignored.
VAD_Support
3CX Valued Professional
3CX Valued Professional
 
Posts: 421
Joined: Thu Aug 06, 2009 5:29 pm

Re: Web service post with void function calls

Postby SWSDEV » Tue Oct 06, 2009 5:34 pm

Well, if I simply return anything at all it will work. So I just return an "OK" string and it won't crash.
Shahzad Qureshi
SWS Development - 3CX Certified Partner
Custom 3CX integration
Salt Lake City, UT USA
801-938-7712
swsdev.com
SWSDEV
Expert
Expert
 
Posts: 246
Joined: Sat Feb 23, 2008 6:51 am
Location: Salt Lake City, Utah - USA

Re: Web service post with void function calls

Postby VAD_Support » Tue Oct 06, 2009 5:44 pm

Yes, if you can change the web service, maybe that's the best approach. But if you can't change it, you can use the web interaction component.
VAD_Support
3CX Valued Professional
3CX Valued Professional
 
Posts: 421
Joined: Thu Aug 06, 2009 5:29 pm


Return to 3CX Voice Application Designer (VAD)

Who is online

Users browsing this forum: No registered users and 0 guests