A Lazy Sequence

ANN: necessary-evil 2.0.0

Version 2.0.0 of necessary-evil, the Clojure library for clients and servers of one of the least loved web protocols, XML-RPC, has been released and is now available on Clojars and Github. The library is built on top of Ring and clj-html.

The following is a simple hello world server using jetty, ring and necessary-evil:

(require '[necessary-evil.core :as xml-rpc]
         '[ring.adapter.jetty :refer [run-jetty]])

(def handler (xml-rpc/end-point 
    {:hello (fn hello 
        ([] (hello "World"))
        ([name] (str "Hello, " name "!")))}))

(run-jetty handler {:port 3000 :join? false})

Thanks to everyone who has reported issues and provided feedback.

Changes

For those unfortunate enough to have needed to use necessary-evil, the following changes have occurred since version 1.2.2:

Note that the serialization and deserialization processes are now asymmetric: For example in a round trip a list will return as vector, Java dates will return as Joda time dates and longs as ints.

For the full list of changes, see the project README.

See also:

6 December 2012