On 1 Mar 2014, at 11:46 AM, Trevor Overman <[email protected]> wrote: > So I'm trying to connect an android application to my web2py website back end > database by using json remote procedure calls. > Currently, I am trying to make a simple test function to remotely add entries > in the db. > Additionally, I am running on GAE. > > What I have right now is: > > db.py > db.define_table('testing', > Field('number_sum','string'), > ) > > default.py > def call(): > return service() > > @service.jsonrpc > def test_add(a,b): > sum = a+b > db.testing.insert(numer_sum=sum) > return a+b > > when I run the following in terminal, > curl http://domain/app/default/call/run/test_add?a=3&b=4 > > I receive an "Object does not exist" error. > Any help would be appreciated!
Change 'run' to 'jsonrpc', since that's how you declared test_add. But curl isn't going to create a jsonrpc request for you, so that part won't work. If you want the curl request to work (with /run/), you need @service.run rather than @service.jsonrpc. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

