Last modified 3 years ago Last modified on 19.07.2014 20:47:00

xmerlrpc

Description

xmerlrpc is a library application providing XML-RPC protocol support for client side and server side. It was written mainly because other Erlang applications for XML-RPC, mostly extracted from ejabberd, don't allow easy writing custom servers and are inconvenient to use on client side.

xmerlrpc exposes API on different levels of XML-RPC protocol. This way you can use it as a high-level block by just calling:

{ok,Result} = xmerlrpc:call(Proc, Args, [{url,URL} | Opts])

There are several places to customize the call, including using different HTTP client, custom HTTP headers or request retry strategy. There's also API for working with raw protocol (xmerlrpc:parse(), xmerlrpc:request(), xmerlrpc:result() and xmerlrpc:exception()), so you can easily add XML-RPC support to existing web applications without running XML-RPC server on a separate port.

For details on usage, see local copy of API documentation.

How to download

Canonical repository location is at jarowit.

git clone http://dozzie.jarowit.net/code/erlang-xmerlrpc.git

There is a supplementary location at GitHub.

git clone https://github.com/dozzie/xmerlrpc

How to install

Installation process is tested for building RPM/DEB packages. If you want to make mess in your system by omitting package system, you are on your own. The application, however, uses rebar to build its code, so it should be pretty standard as for Erlang.

You need casual package building tools for your distribution, either rpm-build (RPMs) or dpkg-dev with fakeroot (DEBs). For Debian, you'll also need dh-rebar (Debian package for Jessie and my backport for >=Squeeze, including source package).

manual build

The process boils down to run rebar compile. *.beam files will be stored in ./ebin directory.

The EDoc documentation can be generated using rebar doc.

Red Hat

  1. Prepare source RPM (non-root privileges are fine here)
    make srpm
    
  2. Build binary RPM (unless you've taken care of building as non-root, you need to be root here)
    rpmbuild --rebuild erlang-xmerlrpc-*.src.rpm
    
  3. Install package with its dependencies (exact path should be printed by previous step); most probably it will be located in /usr/src/redhat/RPMS/noarch/erlang-xmerlrpc-*.rpm

Debian

  1. Build binary package
    dpkg-buildpackage -b -uc
    
  2. Install package (../erlang-xmerlrpc*.deb) with its dependencies