Page 1 of 1

Error running REST service

Posted: Thu Aug 15, 2013 4:19 pm
by Pasteur Miranda

Hi

I created a REST service that has 4 parameters.It's working ok inside the app builder (the test is successful). It's invoked as response to a button click event. Inside the service datasource "complete" event I put the returned text in a variable and show this variable:
var stringhistorico = jqXHR.responseText;
alert(stringhistorico);

The problem is: the stringhistorico variable is blank and in the browser console I receive the following message:

GET http://appery.io/app/rest/tunnel jquery-1.8.2.js:8416
send jquery-1.8.2.js:8416
jQuery.extend.ajax jquery-1.8.2.js:7968
Appery.RestService.$t.createClass.process appery.js:1450
Appery.DataSource.$t.createClass.execute appery.js:1341
$.die.live.click
jQuery.event.dispatch jquery-1.8.2.js:3063
elemData.handle.eventHandle

The service is running using appery proxy. Do you have any idea about what is going wrong? I've been using 3 other services in my application very similar to this one and they are working ok.

Code: Select all

Thank you very much

Error running REST service

Posted: Thu Aug 15, 2013 4:46 pm
by maxkatz

Check in the browser console what the service returned. Maybe the service returns nothing.


Error running REST service

Posted: Thu Aug 15, 2013 5:20 pm
by Pasteur Miranda

Hi Max,

Code: Select all

Thank you for you reply. I had two parameters "date time" formated like this: 2013-08-15  14:44:23. I was submitting these parameters with a space between date and time. The service worked when I placed  "%20" between date and time:  

2013-08-15%2014:44:23.

Thank you very much.