I'm wanting to get JSON RPC to work within web2py controller functions, 
without using pyjamas (which is the example provided in the book)

This is my code for the JSON RPC call:
def test_call():
    from gluon.contrib.simplejsonrpc import ServerProxy
    service = ServerProxy('http://127.0.0.1:8000/app22/default/call/jsonrpc'
)
    result = service.load(1000)
    return locals()

(1) Running it within web2py controller functions = It returns an error: 
ValueError: No JSON object could be decoded

(2) Running it in the browser =  
http://127.0.0.1:8000/app22/default/call/jsonrpc/load/1000 it runs into the 
same error as (1).

(3) Running it in command prompt = it works like a charm.

How do I get it to work within web2py controller functions? Thanks!


-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to