#!/usr/local/bin/python
'''
Created on 4 Nov 2013

@author: jatienza
'''

if __name__ == '__main__':
     from jsonrpc import ServiceProxy, JSONRPCException
     s = ServiceProxy("http://localhost/cgi-bin/pyjsinteraction/cgi-bin/jsonrpcserver.py")
     try:
         print s.echo("foobar")
         print s.add(1,2)
     except JSONRPCException as e:
        print repr(e.error)