I'm attempting to implement an easy method for a customer to create calls to remote functions on our server. Presently, we are able to have only port 80 open, and also, since finances an Apache server running I must use HTTP to hold the JSON-RPC.

Around the server I've got a configuration apply for using JSON-RPC

<Directory /srv/www/htdocs/json-rpc/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride None
    Order allow,deny
    allow from all
    AddHandler mod_python .py
    PythonHandler jsonrpc
</Directory>

And a straightforward test.py

from jsonrpc import handleCGI, ServiceMethod

@ServiceMethod
def echo(msg):
    return msg

Around the client, basically use jsonrpc4j

URL url = new URL("http://10.0.2.2/json-rpc/test.py");
JsonRpcHttpClient jrpcclient = new JsonRpcHttpClient(url);
Object o = {"HELLO"};
String s = (String) jrpcclient.invoke("echo", o, String.class);

I recieve java.io.IOException: stream is closed

And when I personally use json-rpc

public void jrpcEcho() {
    URL url = new URL("http://10.0.2.2/json-rpc/test.py");
    HttpJsonRpcClientTransport jrpctransport = new HttpJsonRpcClientTransport(url);
    JsonRpcInvoker jrpcinvoker = new JsonRpcInvoker();
    TestRPC testrpc = jrpcinvoker.get(jrpctransport, "testRPC", TestRPC.class);
    String s = testrpc.echo("HELLO");
}

public interface TestRPC {
    String echo(String s);
}

I recieve json.rpc.commons.JsonRpcRemoteException: jsonrpc error

Neither of those libraries have good documentation, and the things they're doing have assumes that i'm while using library on the customer and also the server.