A small XML-RPC server.
The server does the bare minimum. It implements the net/http.Handler
interface, does request decoding and response encoding, and handles
errors.
See ./examples
for two server examples. With the server-middleware
example you can run the following commands:
curl --data @./testdata/getCurrentTimeRFC3339.xml http://127.0.0.1:4242/RPC2
curl --data @./testdata/getCurrentTimeUnix.xml http://127.0.0.1:4242/RPC2
curl --data @./testdata/getCurrentTimeWrongFormat.xml http://127.0.0.1:4242/RPC2
curl --data @./testdata/unknownMethod.xml http://127.0.0.1:4242/RPC2
This was part of a test and not completely finished. There's no client, not enough tests, and I think the middleware integration can be improved. But for now it's good enough.
Feel free to send a patch to the mailinglist.
Install with:
go get git.sr.ht/~fsx/xmlrpc-go@latest