Web Service Issue (Voicenet)

Hi all,

I’m trying to integrate voicenet IP telephones with Servoy 7.2.0. When the phone rings I will get a POST to my callback URL from voicenet:

POST http://myserverurl/mysolution/myform?to=01234654321&from=07799779977&event=ringing&call_oid=0003BA7E745651279B9C0072

The documentation says

Implement ws_create(content):Object to allow adding data
By performing an HTTP POST on the url {serverUrl}/servoy-service/rest_ws/{solutionName}/{formName}, the ws_create() method will be invoked. Data has to be supplied in the body of the HTTP Request.

As far as I can see I will not receive a body from voice net, all the data is in the URL. If I try the following in the terminal:

curl -X POST http://127.0.0.1:8080/servoy-service/rest_ws/mbs_automatic/voicenet?to=01234654321&from=07799779977&event=ringing&call_oid=0003BA7E745651279B9C0072

If I try I get a HTTP 204 response (NO CONTENT)

Any way around this in Servoy? or do I need to use an intermediary web service and post onto Servoy in the correct format? I could easily create this in Rails.

Have a look at Velocity, it’s far more expensive in terms of retrieving and sending any type of requests, no problem to invoke a web service with a simple url, that will invoke a single vr_getContext(request) with all the parameters passed in the URL as a request.parameters object

https://www.servoyforge.net/projects/ve … /WebClient

swingman:
Any way around this in Servoy?

Write your own endpoint in jsp or Velocity. Velocity being the most popular by far as Patrick has cut a lot of corners for you already.

I don’t know anyone using Servoy’s default REST implementation.

I already have a Rails site providing complex web services for the Servoy system, so I just added one more service.
We are on smart client. Having the Servoy server listening for web services would require licenses for a pool of headless clients, right?

swingman:
Having the Servoy server listening for web services would require licenses for a pool of headless clients, right?

I’d say it’s the other way around: using the velocity web service you can create a pool of connections, just using 1 Servoy license.
The size of the pool is configurable in velocity’s config file.

Should really try it, great stuff!

make a case that we support also none body stuff (or a combination of post data and the headers)
it is not really clear what the spec really wants but i did find some info:

http://lists.w3.org/Archives/Public/iet … /0276.html

where they say that both are kind of fine.