Skip to content
This repository has been archived by the owner on Oct 9, 2020. It is now read-only.

Can I use this client to read a response from python RPC server? #1

Open
temco opened this issue Jun 24, 2019 · 2 comments
Open

Can I use this client to read a response from python RPC server? #1

temco opened this issue Jun 24, 2019 · 2 comments

Comments

@temco
Copy link

temco commented Jun 24, 2019

For example, I wrote in serv.py as follows:

from xmlrpc.server import SimpleXMLRPCServer
def is_even(n):
    return n % 2 == 0
server = SimpleXMLRPCServer(("localhost", 8000))
print("Listening on port 8000...")
server.register_function(is_even, "is_even")
server.serve_forever()

And could I build a clojure RPC client to call is_even at localhost:8000

@carlalbrecht
Copy link
Owner

Hi there!

You certainly can use this library to call RPC server functions implemented in other languages.

However, you appear to be using XML-RPC in Python, rather than JSON-RPC. This won't work. You will either need an XML-RPC client library for Clojure, or a JSON-RPC server library for python.

@temco
Copy link
Author

temco commented Jun 26, 2019 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants