Francisco Narro
Posts: 0
Joined: Thu Oct 03, 2013 9:58 am

Manual implementation on WebServices not working

Hi,
Today, when I have built my app, I can see that my services with manual implementation are not working.
Last week all of them were working.

I try to create new ones but none are working.

I see that Appery, now it is not calling them.
Help please.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Manual implementation on WebServices not working

Please post the service's code and what exactly doesn't work. When your app runs, Appery.io doesn't call your services. The browser simply invokes your code (the app runs in the browser)

Francisco Narro
Posts: 0
Joined: Thu Oct 03, 2013 9:58 am

Manual implementation on WebServices not working

My App is the same that last week but now it isn't working.

I invoke the service in the page event.

I build manually the response map
$
--Detalle
--ID

And I add my JS code in the implementation:
precode
$t.jsGetProyectos1 = $t.createClass(null, {

Code: Select all

 init : function(requestOptions) { 
     this.__requestOptions = $.extend({}, requestOptions); 
 }, 

 process : function(settings) { 
     if (this.__requestOptions.echo) { 
         settings.success(this.__requestOptions.echo); 
     } else { 
         var db = window.openDatabase(dbName, dbVersion, dbName, dbSize); 
         var __Rows = []; 
         console.log("hola"); 
         db.transaction(function(tx) { 
             tx.executeSql('SELECT detalle, ID FROM "Ubicaciones" where tipo = 1 order by detalle', [], function(tx, results) { 
                 var v_len = results.rows.length; 
                 if (v_len > v_limite) {v_len = v_limite;} 
                 for (var i = 0; i < v_len; i++) { 
                     fnLog(results&#46;rows&#46;item(i)['detalle']); 
                     if (results&#46;rows&#46;item(i)['detalle'] == "") { 
                         results&#46;rows&#46;item(i)['detalle'] = '<sin nombre>'; 
                         fnLog("hay que cambiar"); 
                     } 
                     __Rows&#46;push(results&#46;rows&#46;item(i)); 
                 } &#47;&#47; for 

             console&#46;log(JSON&#46;stringify(__Rows)); 
             settings&#46;success(__Rows); 
             settings&#46;complete('success'); 
             }); &#47;&#47; SELECT 
         }); &#47;&#47; Transaction 

     } 
 } 

});

/code/pre

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Manual implementation on WebServices not working

Can you tell us exactly where the service fails?

Do you get anything here:
console.log(JSON.stringify(__Rows));

Francisco Narro
Posts: 0
Joined: Thu Oct 03, 2013 9:58 am

Manual implementation on WebServices not working

the service not fails, simply the app isn't invoking it.
I have put log and alert tags in some points of the code and the app is not calling it.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Manual implementation on WebServices not working

Can you tell us where exactly the app stopped working, on service invocation? Does it work if you invoke the service on button click for example?

Francisco Narro
Posts: 0
Joined: Thu Oct 03, 2013 9:58 am

Manual implementation on WebServices not working

I have tried, and if I invoke the service from a button. It works fine, but not if I invoke from the page show event.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Manual implementation on WebServices not working

Check if the service is actually invoked on page show. Add another event handler to see if it is invoked.

Francisco Narro
Posts: 0
Joined: Thu Oct 03, 2013 9:58 am

Manual implementation on WebServices not working

I have deleted the old page shown event and created it again and it not work.
I have created another page shown event that show an alert message and it work fine.

maxkatz
Posts: 0
Joined: Fri Aug 13, 2010 3:24 pm

Manual implementation on WebServices not working

Can you put a break point at the top of the service -- to see if execution goes inside the service?

Return to “Issues”